ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Sub-Templates Not Working

January 26, 2011 5:48am

Subscribe [3]
  • #1 / Jan 26, 2011 5:48am

    mr_tim

    43 posts

    For some reason I can’t get the embeds to display in an ee 1.7 install… Even the example lifted straight from the EE legacy docs (http://expressionengine.com/legacy_docs/templates/embedding_templates.html)

    Both templates are webpages, I’ve tried moving them into the same template group. I had been working with conditionals, so stripped it right back to passing a value and I get nothing. Any ideas as to what might be going on?

  • #2 / Jan 26, 2011 5:58am

    Paul Stone

    97 posts

    Hi Mr Tim,

    Can you share the code for the templates you’re trying?

    Also, it might be worth turning on the setting to print out template debugging to the browser to see if there is anything helpful being logged.

    Thanks,
    Paul.

  • #3 / Jan 26, 2011 4:07pm

    mr_tim

    43 posts

    OK, I’ve stripped it back completely and it’s still not working. Here’s my code:

    Main template (hi):

    hi {embed:dog_name}

    Sub-template (dog):

    {embed="events/hi" dog_name="Shadow"}

    Output:

    hi

    Both templates are in the events template group.

  • #4 / Jan 27, 2011 6:45am

    Paul Stone

    97 posts

    I’m afraid to say I’ve no idea…

    Anyone else have any ideas?

  • #5 / Jan 27, 2011 6:50am

    mr_tim

    43 posts

    It’s got me stumped. Am I missing a global setting or something?

  • #6 / Jan 27, 2011 7:53am

    Paul Stone

    97 posts

    Are you working with ‘templates’ as files, or are you amending the templates through the Control Panel?

  • #7 / Jan 27, 2011 7:54am

    mr_tim

    43 posts

    Through the control panel.

  • #8 / Jan 27, 2011 5:41pm

    Sue Crocker

    26054 posts

    Hi, mr_tim.

    The main and embedded template are backwards.

    You’d call the first one..

    {embed="hi/mydogname" dog_name="Shadow"}

    and in hi/mydogname you’d have:

    hi {embed:dog_name} 

    See the difference? Does that help?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases