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.

SOLVED: embed variables - do they work with hidden .includes?

April 20, 2011 2:38pm

Subscribe [1]
  • #1 / Apr 20, 2011 2:38pm

    willrice

    9 posts

    I’m trying to pass the current year into my footer (includes/.footer) and for some reason I keep getting the tag, rather than the value displayed in my footer…

    In my main template:

    {embed="includes/.footer" the_current_year="{current_time format='%Y'}"}

    And in includes/.footer:

    <div id="footer" class="clearfix">
         • Website designed by William Rice, powered with <a href="http://www.expressionengine.com" target="_blank" rel="noopener">expression engine</a> & hand coded in <a href="http://www.panic.com/coda/" target="_blank" rel="noopener">coda</a> • All content © William Rice 2010 - {embed:the_current_year} •
    </div><!-- footer -->

    Renders this to the page:

    • Website designed by William Rice, powered with expression engine & hand coded in coda • All content © William Rice 2010 - {embed:the_current_year} •

    What am I doing wrong? Is it because my footer include is hidden (prefixed with a ‘.’)?

    Note: I have even tried changing the code in my main template to:

    {embed="includes/.footer" the_current_year="2011"}

    but the outcome was the same.

    Thanks in advance for the help!

    Will

  • #2 / Apr 20, 2011 2:47pm

    willrice

    9 posts

    SOLVED:

    In template manager I had the template type set to “static” for .footer. Changing this to “web page” solved the issue.

    Having fixed this, I was also able to change the code to simply:

    {embed="includes/.footer"}
    <div id="footer" class="clearfix">
         • Website designed by William Rice, powered with <a href="http://www.expressionengine.com" target="_blank" rel="noopener">expression engine</a> & hand coded in <a href="http://www.panic.com/coda/" target="_blank" rel="noopener">coda</a> • All content © William Rice 2010 - {current_time format="%Y"} •
    </div><!-- footer -->
  • #3 / Apr 20, 2011 3:02pm

    Sue Crocker

    26054 posts

    Glad you have a solution.. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases