I have a template where I am passing in a parameter to determine which HTML header to display and am using a global variable to compare against. The {if} block below never evaluates, but when I output the values directly to the page they equal each other. Could someone point out where I might be going wrong?
site/index
{!-- Pass in the name of the template containing meta data. Do not include the group template name here. Must reside in the snippets template group. --}
{embed="embeds/header" meta="{global_meta_main}"}embeds/header
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html >
<head>
<title>Site Title</title>
{!-- include page specific metadata --}
{embed="snippets/{embed:meta}"}
</head>
<body>
{!-- We have 2 different headers; one for the main page and one for everyone else --}
{if "{embed:meta}" == "{global_meta_main}"}
{embed="embeds/navigation"}
{if:else}
{embed="embeds/navigation_with_banner"}
{/if}
If seem to be running into the same issues as in this post. To note, I’m not querying any entries at this point. This is just for meta tags and header and navigation.
http://ellislab.com/forums/viewthread/137191/
Thanks.
Chris