Answer the question
In order to leave comments, you need to log in
How to display individual blog posts through different templates in October (Winter CMS)?
Hello. There was a need for certain records to make a separate template for displaying the content of the post. Can you please tell me the best way to organize this?
Rainlab Blog module
Answer the question
In order to leave comments, you need to log in
Twig allows you to pull up one or another piece of the template according to the condition. Like this:
{% if current is defined %}
{% partial __SELF__ ~ '::page' %}
{% else %}
{% partial __SELF__ ~ '::list' %}
{% endif %}
$this->page['current']
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question