Since Layout templates are so handy (cutting the template into interchangeable header/sidebar/footer, etc), why should our use an embed tag? Any ideas on when you should not use an embed tag over a layout tag?
You can use embeds for several things:
- to nest the same module inside itself or modules which have conflicting variables inside each other, because this can cause serious conflicts on the same template. Like a
exp:channel:entriestag inside another one or a
- to have a different template cache time on an embed from the template it's loaded;
- to have similar templates loading at different URLs, if you are too scared of routes. Something like
/boatsloading the same template;