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.

Channel Data Parsed Through Embed

January 23, 2011 3:10pm

Subscribe [3]
  • #1 / Jan 23, 2011 3:10pm

    koko.pelli

    176 posts

    Hi all,

    Just a quick question… say I pull in channel data into a template:

    {exp:channel:entries channel="channel-name" entry_id="1"}
         {title}
         {article}
    {/exp:channel:entries}

    But then, I want to embed say a breadcrumb trails, but the breadcrumb trail code is inside another template…

    {exp:channel:entries channel="channel-name" entry_id="1"}
         {embed="templatename/crumbtrail"}
         {title}
         {article}
    {/exp:channel:entries}

    The crumbtrail template contains:

    <a href="#">home</a> » {title}

    As soon as I embed a template which tries to output data from the channel called inside the previous template… it fails to pull in data from the entry_id and will just output the code:

    {title}

    Is there a way I can embed the template, but let that embedded template know which data it should pull in?

    Does that make sense? Apologies, finding it hard to explain what I mean exactly.

    Thank you
    Si

  • #2 / Jan 24, 2011 8:25am

    Sue Crocker

    26054 posts

    Hi, Si.

    Yes, that makes sense.

    See: EEDocs:// Embedding Templates

    Does that help?

  • #3 / Jan 24, 2011 8:27am

    koko.pelli

    176 posts

    Ahh yeah, that is perfect, thank you!

  • #4 / Jan 24, 2011 3:21pm

    Ingmar

    29245 posts

    Glad to see Sue was able to help. Please don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases