skip to Main Content

For example I know of

{{block class="MagentoCmsBlockBlock" block_id="block_identifier"}}

But where can I find documentation on all available features of this template language?
What other arguments can I use for {{ block }} etc.

2

Answers


  1. The official Magento 2 documentation doesn’t specify this. But, I think you can typically access all public fields of the base block class. If you are on a dev environment, their might be an error output even, if you use a wrong attribute. That error output probably shows, which attributes you are allowed to use.

    Login or Signup to reply.
  2. The class responsible for parsing the {{ }} directives in
    CMS Blocks and Pages is MagentoCmsModelTemplateFilter
    which extends MagentoEmailModelTemplateFilter.
    In the latter the following directives are implemented:

    • block
    • layout
    • view
    • media
    • store
    • trans
    • var
    • protocol
    • config
    • customvar
    • css
    • inlinecss
    • widget

    The last one is provided by the Widget module.

    You can find some more info in this section the official Magento docs

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search