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.

emb:vars not being expanded

June 21, 2007 3:10pm

Subscribe [2]
  • #1 / Jun 21, 2007 3:10pm

    cerias

    4 posts

    Okay, for the sake of simplicity, I’ve set up a smaller example that demonstrates my larger problem.  I’m utilizing embedded templates and passed vars to try to set up a default template set that will be used sitewide in most cases.

    cerias_site/index:

    {assign_variable:my_weblog="default_site"}
    {assign_variable:my_template_group="site"}
    {assign_variable:page_title="About CERIAS"}
    {assign_variable:body_id="about"}
    
    <ul>
    <li>{my_weblog}</li>
    <li>{my_template_group}</li>
    <li>{page_title}</li>
    <li>{body_id}</li>
    </ul>
    
    {embed="cerias_site/page"
        my_template_group="{my_template_group}"
        my_weblog="{my_weblog}"
        page_title="{page_title}"
        body_id="{body_id}"}

    cerias_site/page

    {!-- 
    Variables that come in from embedding:
    emb:my_weblog             The weblog we're using
    emb:my_template_group    The specialized template group we're using
    emb:page_title             The title of the page
    emb:body_id                The id for the body tag    
     --}
    
    {!-- This group is the one used for all of the base cerias page templates --}
    {assign_variable:base_template_group="cerias_site"}
    
    <ul>
    <li>{emb:my_weblog}</li>
    <li>{emb:my_template_group}</li>
    <li>{emb:page_title}</li>
    <li>{emb:body_id}</li>
    </ul>

    None of the {emb:var} tags will expand for me when I load up cerias_site/index:

    http://www.cerias.purdue.edu/_ee/index.php/cerias_site/index/

    I’m sure I’m misunderstanding something about passing vars via embed. What is it?

  • #2 / Jun 21, 2007 3:18pm

    Derek Jones

    7561 posts

    Embed Variables.  You need {embed:var}, not {emb:var}

  • #3 / Jun 21, 2007 3:20pm

    cerias

    4 posts

    Oh good lord.  Color me embarrassed…

  • #4 / Jun 21, 2007 3:27pm

    Derek Jones

    7561 posts

    :-D

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

ExpressionEngine News!

#eecms, #events, #releases