Skip to main content
9 events
when toggle format what by license comment
Feb 24, 2017 at 14:20 comment added Yuri Salimovskiy If your entries are in Structure, and some pages need to use different template, you can use this code in your 'main' template defined in section settings. {% extends [ craft.request.path, '_generic' ] %}
May 28, 2015 at 15:25 history edited Ben Croker CC BY-SA 3.0
Added even more flexible code example
Dec 17, 2014 at 19:26 comment added Ben Croker no, not in the scenario above
Jun 30, 2014 at 17:58 comment added Steve Adams Im having a bit of a problem managing this method where the entry.uri file needs to extend blocks in the main file. Any ideas?
Jun 16, 2014 at 7:54 vote accept Ben Croker
Jun 12, 2014 at 20:23 comment added Lindsey D In my opinion, this should be marked as the best answer. You may also want to share this "recipe" on craftcookbook.net
Jun 12, 2014 at 20:00 history edited Ben Croker CC BY-SA 3.0
added 188 characters in body
Jun 12, 2014 at 19:46 comment added Lindsey D That's very clever! Per the Twig docs, "The first template that exists will be used as a parent". twig.sensiolabs.org/doc/tags/extends.html#dynamic-inheritance
Jun 12, 2014 at 19:41 history answered Ben Croker CC BY-SA 3.0