[LRUG] A question about template nesting preferences :)

Denny 2020 at denny.me
Sat Sep 26 11:21:08 PDT 2020


Hi all,

I'm working on a CMS with a theme system that allows you to selectively 
override just the bits you don't like from the default templates - so 
you can knock together minor variations quite quickly.

If you were working with this system, would you prefer the default 
templates to look like this...

Top level template:
<... header stuff ...>
<section>
   <include SectionTemplate>
</section>
<... footer stuff ...>

SectionTemplate:
<... stuff that goes inside the section ...>

Or like this...

Top level template:
<... header stuff ...>
<include SectionTemplate>
<... footer stuff ...>

SectionTemplate:
<section>
   <... stuff that goes inside the section ...>
</section>

In the above example, you might be choosing to override the general 
layout (the top level template) but still using the original template 
for the section content, or you might be leaving the layout alone and 
just overriding the section content template. I think my answer 
flip-flops depending on which of those scenarios I think about, so I was 
interested in hearing other people's thoughts...

Cheers,
Denny


More information about the Chat mailing list