Question

If I add ApplicationContent to a region on a feincms page, how do I update the feincms_page's context?

Use case

Changing a feincms_page's title to the application content's title

Était-ce utile?

La solution

Use the fragment templatetag

app template:

{% fragment request "frag_title" %} my title {% endfragment %}

inherited template:

{% if request|has_fragment:"frag_title" %}
    <title>{% get_fragment request "frag_title" %}</title>
{% else %}
    <title>{{ feincms_page.title }}</title>
{% endif %}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top