Skip to content

Info Page Content

Availability:

  • Info page


Use info_page_content module to insert a content of a currently viewed info page and is only available within them. To see the list of your info pages and manage them visit /configInfoPages/list in the admin panel.

Configuration parameters

none

Module source code

{% set page = ObjectApi.getPage(page_id) %}
{% set shopUrls = ObjectApi.getShopUrls() %}

{% set hasEditorSettingsAppearance = moduleConfig.moduleAppearance == 'editorSettings' %}

{% set resetCssClass = hasEditorSettingsAppearance ? 'resetcss' : '' %}

<section data-turbo="false" class="info-page-content fr-view {{ resetCssClass }} grid-mobile-wrap">{{ inject_contact_form(page.content|raw) }}</section>

{% if ObjectApi.getFeatureFlag("dev_article_jsonld_fixes").isEnabled %}
    {% set infoPageJsonLd = {
        "@context": [
            "http://schema.org/",
            { "@base": shopUrls.mainPageUrl.absolute }
        ],
        "@id": page.url.relative,
        "@type": "Article",
        "abstract": page.shortContent | striptags,
        "description": page.content | striptags
    } %}

    <script type="application/ld+json">
        {{ infoPageJsonLd | json_encode | raw }}
    </script>
{% else %}
    <script type="application/ld+json">
        {
            "@context": [
                "http://schema.org/",
                { "@base": "{{ shopUrls.mainPageUrl.absolute }}" }
            ],
            "@id": "{{ page.url.relative }}",
            "@type": "Article",
            "description": "{{ page.content|striptags }}"
        }
    </script>
{% endif %}

Used Object Api methods

Module configuration schema

[
    {
        "state": "unfolded",
        "label": "General settings",
        "elements": [
            {
                "type": "radio",
                "name": "moduleAppearance",
                "label": "The module content appearance is determined by:",
                "defaultValue": "editorSettings",
                "options": {
                    "radioOptions": [
                        {
                            "key": "editorSettings",
                            "label": "only by the settings from the text editor"
                        },
                        {
                            "key": "editorAndSkinSettings",
                            "label": "text editor and store theme style",
                            "hint": "If you do not change the appearance of the content (e.g. text size and color) in the text editor, the module will use the store theme styles."
                        }
                    ]
                }
            }
        ]
    }
]