0

I have three templates, simplified here for your digestion:

First One:

{layout="giving/.giving_meta"}

                        <div class="row">
                            <div class="col-md-4">
                                <h4>Guide To Giving</h4>
                                <p>Integer lacinia sollicitudin massa. Cras metus. Sed aliquet risus a tortor. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. </p>
                            </div>
                            <div class="col-md-4">
                                <h4>Greatest Needs</h4>
                                <p>Integer lacinia sollicitudin massa. Cras metus. Sed aliquet risus a tortor. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. </p>
                            </div>
                            <div class="col-md-4">
                                <h4>Impact</h4>
                                <p>Integer lacinia sollicitudin massa. Cras metus. Sed aliquet risus a tortor. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. </p>
                            </div>
                        </div>

Onward, I have .giving_meta:

{layout="master_templates/.backpage}
     {layout:set name="title"}MyTitle{/layout:set}
        {layout:set name="department"}Department{/layout:set}

Finally my .backpage template (again, abridged for utility):

<a bunch of html>
{layout:contents}
<more HTML and stuff, the end>

{layout:contents} is not making it to the third and final template. It arrives just fine if I point the first template to .backpage directly, but otherwise it's a no show. Any ideas? I'm on EE 2.9.2.

2
  • Suggestion: just make giving_meta a snippet. Commented Jul 9, 2015 at 17:45
  • I could hack a result a number of ways, but I think what I'm trying to do should work and would be the best design pattern for my site. Content identifies with a section/department which identifies with the primary layout. Commented Jul 17, 2015 at 15:14

1 Answer 1

0

I'm not sure, because I never tried to use nested layout templates, but I believe that {layout:contents} have its value set on every template. So, the second one needs to be:

{layout="master_templates/.backpage}
{layout:set name="title"}MyTitle{/layout:set}
{layout:set name="department"}Department{/layout:set}
{layout:contents}

Specially for a matter of performance, I recommend you to limit the number of layouts and embeds to a minimum. I can't even imagine a reason for what you're doing. You could have set the meta on the first one.

2
  • I'll try what you advise and let you know - I don't know why the {layout:contents} wouldn't get inherited, but who knows. The reason I'm doing this is pretty standard - using partials to avoid repetitive code. I manage a College website with a variety of departments who all want to be special. So I have a master template (site wide), a department level template (per department) and then one offs to allow customized content. Commented Jun 10, 2015 at 14:05
  • So, the .giving_meta isn't just to... Give the meta? I'm sorry!
    – Sobral
    Commented Jun 10, 2015 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.