Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% extends "_layout" %}
- {# switch content based on Entry Type #}
- {% switch entry.type %}
- {% case 'landing %}
- {# my landing page content or template include #}
- {% case 'entry' %}
- {# my entry page content or template include #}
- {% case 'contact' %}
- {# my contact page content or template include #}
- {% endif %}
- {% extends "_layout" %}
- {# if no body content and has descendants (i.e. no landing page)
- # redirect to first descendant with content defined #}
- {% if not entry.body is defined or entry.body == "" %}
- {% set decendants = entry.descendants %}
- {% if decendants|length %}
- {% redirect decendants.first().url %}
- {% endif %}
- {% endif %}
- {% block content %}
- {{ entry.title }}
- {{ entry.body }}
- {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement