Can you create child-layouts in October CMS?
Ad
I want to have a main-layout and then several child-layouts that have some specific styling. Is this possible in October CMS? I cannot find anything on their documentation page.
Ad
Answer
Ad
maybe try using partial, where you define your child-layout code. Here is example for sidebar
<div class="container">
<div class="row">
<div class="col-md-9">
{% page %}
</div>
<div class="col-md-3 sidebar">
<!--right sidebar content-->
{% partial 'sidebar' %}
</div>
</div>
</div>
you can even use some ifs
{% if this.page.id == 'home' %}
{% partial 'home-slider' %}
{% endif %}
Ad
source: stackoverflow.com
Related Questions
Ad
- → OctoberCMS Backend Loging Hash Error
- → "failed to open stream" error when executing "migrate:make"
- → OctoberCMS - How to make collapsible list default to active only on non-mobile
- → Create plugin that makes objects from model in back-end
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → How to install console for plugin development in October CMS
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → October CMS - Conditionally Load a Different Page
Ad