/shopware-6-twig-extensions

This Shopware 6 plugin adds more Twig features.

Primary LanguagePHPMIT LicenseMIT

Tests Coverage Version License

Shopware 6 Twig extensions

This Shopware 6 plugin adds more Twig features.

Installation

  1. Navigate to the root folder of your Shopware installation.
  2. Download the plugin.
    composer require jhae/shopware-6-twig-extensions
  3. Refresh the Shopware plugin list.
    ./bin/console plugin:refresh
  4. Install and activate the plugin.
    ./bin/console plugin:install --activate JhaeTwigExtensions

You are ready to use the Twig extensions in your templates.

Twig functions

sw_cms_page

This function allows you to include any CMS page you created in "Content / Shopping Experiences".

Usage

{{ sw_cms_page(id) }}

Parameters

Name Type Description
id string The ID of the CMS page.
Example: 'c00dd7c0b7684ebca451f49dd6e636aa'