Theme Commands

Commands for listing, activating, and resetting themes in PteroCA. Themes can target different contexts: panel, landing, and email.

List Themes

The pteroca:theme:list command displays all installed themes along with their context information and active status.

  • Command: pteroca:theme:list

  • Alias: theme:list (deprecated, removed in v1.0.0)

Options

  • --context[=CONTEXT] (-c): Filter themes by context (panel, landing, email)

Examples

# List all installed themes
php bin/console pteroca:theme:list

# List only themes that support the panel context
php bin/console pteroca:theme:list --context=panel

# List only themes for the landing page
php bin/console pteroca:theme:list -c landing

# Deprecated (still works until v1.0.0)
php bin/console theme:list

Output

The command displays two tables:

  1. Active Themes - Shows the currently active theme for each context (panel, landing, email).

  2. Themes - Lists all installed themes with their name, version, author, supported contexts, and active status.

Set Theme

The pteroca:theme:set command activates a theme for a specific context. It validates that the theme exists, supports the target context, and verifies the theme license before activation.

  • Command: pteroca:theme:set

  • Alias: theme:set (deprecated, removed in v1.0.0)

Arguments

  • theme (required): The name of the theme to activate

  • context (required): The context to set the theme for (panel, landing, email)

Examples

Important Notes

Theme Validation: The command verifies that the specified theme exists and supports the target context before activation. If the theme does not support the requested context, the command will display the supported contexts and exit with an error.

License Verification: Themes obtained from the PteroCA Marketplace require a valid license. The command checks the license status before activation. If the license is invalid or the theme has been blacklisted, activation will be refused.

Already Active: If the specified theme is already active for the given context, the command will display a warning and exit without making changes.

Reset Theme

The pteroca:theme:reset command resets the active theme back to the default theme for one or all contexts.

  • Command: pteroca:theme:reset

  • Alias: theme:reset (deprecated, removed in v1.0.0)

Arguments

  • context (optional): The context to reset (panel, landing, email). If omitted, all contexts are reset to the default theme.

Options

  • --force (-f): Skip the confirmation prompt

Examples

Interactive Mode

Interactive Mode (when not using --force):

  • Displays a table of planned changes showing the current theme and the new (default) theme for each context

  • Prompts for confirmation before proceeding

Force Mode (--force):

  • Skips the confirmation prompt and applies changes immediately

  • Suitable for scripted or automated workflows

Important Notes

Selective Reset: Contexts that are already using the default theme are skipped automatically.

Context Support: If the default theme does not support a particular context, that context will be skipped with a warning.

Last updated