I set up the following simple template:
{exp:channel:entries channel="industries" require_entry="true" limit="1"}
<pre>
current_path = {current_path}
page_uri = {page_uri}
----
Check current_path:
{if "{current_path}" == "industry/government/test"}
TRUE
{if:else}
FALSE
{/if}
----
Check page_uri:
{if "{page_uri}" == "/industry/government/test"}
TRUE
{if:else}
FALSE
{/if}
</pre>
<p>{/exp:channel:entries}I get the following output:
<pre>
current_path = industry/government/test
page_uri = /industry/government/test
----
Check current_path:
FALSE
----
Check page_uri:
TRUE
</pre><p>What am I missing??
Furthermore, if I add a 3rd conditional i get an error message—> (Parse error: syntax error, unexpected ‘}’ ):
{exp:channel:entries channel="industries" require_entry="true" limit="1"}
<pre>
current_path = {current_path}
page_uri = {page_uri}
----
Check current_path:
{if "{current_path}" == "industry/government/test"}
TRUE
{if:else}
FALSE
{/if}
----
Check page_uri:
{if "{page_uri}" == "/industry/government/test"}
TRUE
{if:else}
FALSE
{/if}
----
Compare page_uri and current_path:
{if "{page_uri}" == "/{current_path}"}
TRUE
{if:else}
FALSE
{/if}
</pre>
<p>{/exp:channel:entries}