This is the page template:
{exp:channel:entries channel="pages" limit="1"}
{embed="embeds/header" active_entry_id="{entry_id}"}
<div id="static-page" class="body">
<h1>{title}</h1>
{body}
</div>
{embed="embeds/footer"}
{/exp:channel:entries}The page template embeds the header template. The following is the header template responsible for generating navigation:
<ul class="navigation">
{exp:channel:entries channel="pages" show_pages="only" search:appear_on_navigation="yes"}
<li {if entry_id == embed:active_entry_id}class="active"{/if} ><a href="http://{page_url}">{title} |{entry_id}#{embed:active_entry_id}|</a>
</li>
{/exp:channel:entries}
</ul>Notice the “entry_id == embed:active_entry_id” & “|{entry_id}#{embed:active_entry_id}|” in the header template. The problem is, that “|{entry_id}#{embed:active_entry_id}|” prints “|7#7|”, however, the IF conditional returns false.
What is it that I am doing wrong? and, is it generally the right way to get the present active entry ID inside the navigation?