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.

Variable Embedding

January 03, 2011 3:45pm

Subscribe [2]
  • #1 / Jan 03, 2011 3:45pm

    danklingjr

    5 posts

    Hello, I am trying to embed a variable from my templates into the title tag and it will not seem to work properly.  This is not the first time I’ve done this with EE 2 and I can’t seem to figure out why it is not working.  Is there a setting that is enabled that needs disabled or vice versa?

    Here is what it looks like in the template:
    {embed="common/header" my_page_title=“people” description=“Eliminating Racism, Empowering Women,YWCA”}

    and here is where I am calling the embed variable in the title tag:
    <title>{site_name} | {embed:my_page_title}</title>

  • #2 / Jan 07, 2011 11:55am

    smartpill

    456 posts

    No setting. As long as the template is set as a Web Page and not Static or something else it should work. Is

    {embed:my_page_title}

    in the common/header template? I’m guessing the text formatting for the thread automatically changed your straight quotes to curly quotes but make sure they are straight quotes

    {embed="common/header" my_page_title="people" description="Eliminating Racism, Empowering Women,YWCA"}

    and maybe make sure there’s no caching on the common/header template since the main page would be caching that anyway. You could try taking everything out of the “header” template and only put

    {embed:my_page_title}

    in it and see if that shows first. If that works then something else in the template is messing it up.

  • #3 / Jan 13, 2011 7:06pm

    danklingjr

    5 posts

    AHA!  I had it set to static.  I swear I had it set to webpage, but I guess thats what happens when you work on a project a lot in a small amount of time.  A little burnt out I suppose.  Thank you for taking a look.

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

ExpressionEngine News!

#eecms, #events, #releases