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.

Passing variables to another template

December 09, 2013 8:08pm

Subscribe [2]
  • #1 / Dec 09, 2013 8:08pm

    jledford

    3 posts

    I am working on a template that embeds another template and would like to pass variables to it.  I am able to pass variables no problem through the embed tag, but there is one that is giving me a problem.  In the parent template I have a field

    {image:url}

    and am trying to pass that through the embed tag.  Thats the only variable with a colon and the only one not working and I am wondering if thats the issue or if I am just doing something wrong.  Please let me know if thats enough to go on or if you need to see code.

  • #2 / Dec 10, 2013 11:48am

    Kurt Deutscher

    827 posts

    So in one template you have something like:

    {embed="template-group/template" image-url="{image:url}”}

    and in the other you have something like:

    {embed:image-url}

    Is that basically what you have, or need?

    Is this for use with the new Grid field types?

  • #3 / Dec 10, 2013 12:28pm

    jledford

    3 posts

    Looking this morning I realized I was calling the variable outside of the container.  Moved it inside and now it works.  Thanks for taking a look.

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

ExpressionEngine News!

#eecms, #events, #releases