I know this may sound odd but something is driving me a bit batty and I'd love to get an opinion.
When I use the if statement with k_template_name
everything is fine. I look at the source code from the 'about' page (the template name being 'about.php') and see this:
But when I add the OR logic:
I get this on both the index page and about page. I did use cms:dump to make 100% sure of the template names.
from cms:dump -
k_template_name: index.php
k_template_name: about.php
I'm wondering if my OR logic is formatted correctly. I've tried reversing the quote marks, I've added parenthesis to both sets.
I can't think of anything else to do so I'm reaching out. From the guide (http://docs.couchcms.com/tags-reference/if.html) I feel like I'm formatting it correctly. Any help?
When I use the if statement with k_template_name
- Code: Select all
<li><a href="<cms:if k_template_name != 'about.php' ><cms:show k_site_link /></cms:if>#templatemo_about">About</a></li>
everything is fine. I look at the source code from the 'about' page (the template name being 'about.php') and see this:
- Code: Select all
<a href="#templatemo_about" class="current">About</a>
But when I add the OR logic:
- Code: Select all
<li><a href="<cms:if k_template_name != 'about.php'|| k_template_name != 'index.php' ><cms:show k_site_link /></cms:if>#templatemo_about">About</a></li>
I get this on both the index page and about page. I did use cms:dump to make 100% sure of the template names.
- Code: Select all
<a href="http://mysite.com/#templatemo_about">About</a>
from cms:dump -
k_template_name: index.php
k_template_name: about.php
I'm wondering if my OR logic is formatted correctly. I've tried reversing the quote marks, I've added parenthesis to both sets.
I can't think of anything else to do so I'm reaching out. From the guide (http://docs.couchcms.com/tags-reference/if.html) I feel like I'm formatting it correctly. Any help?
