Skip to content

title static-pages Breadcrumb and dynamic pages #871

Answered by bennothommo
oim37 asked this question in Q&A
Discussion options

You must be logged in to vote

If you have the staticPage component in the layout, you can use the following condition to detect if a static page is being viewed:

{% if staticPage.pageObject %}
    Static page loaded
{% else %}
    Dynamic page loaded
{% endif %}

The $pageObject property of the staticPage component will be null if no static page could be found for the following URL, or if you are using a normal CMS page for that URL.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@oim37
Comment options

Answer selected by bennothommo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants