Hi, I’ve posted about my sub-nav menu problem before, but I had to change the way it was coded and now I cannot get what I want anymore.
I am trying to use a conditional statement to write some code to my template when I am in category 10 only, and not any of these categories: “C11|C12|C13|C14|C15”.
I could use this:
{if segment_3 == "C10"}
code here….
{/if}...but this doesn’t work because the URL of the pages in category 10 do not have segment_3 in their URL; their segment_3 is the name of the blog entry within that category.
Here is a url from page that is in category 10:
http://64.106.177.24/index.php/seidenschein/practice_areas/421-a_benefits/
So, to get around this I did the following:
This is what is currently on the template “seidenschein/practice_areas”:
{if segment_3 != "C11|C12|C13|C14|C15"}
{exp:weblog:entries weblog="practice_areas" category="10" disable="pagination|member_data|trackbacks" dynamic="off" fixed_order="5|33|34|35|36" status="open"}
<div class="spaceunder"><a href="http://{url_title_path=seidenschein/practice_areas}">{title}</a></div>
{/exp:weblog:entries}
{/if}However, when you are on a page where segment_3 DOES equal “C11|C12|C13|C14|C15”, the code inside the (if) statements DOES get written to the page. But it should not be doing so.
A sample URL:
http://64.106.177.24/index.php/seidenschein/practice_areas/C13/
As you can see, the code (in the left column under the blue “practice areas” graphic) does get written, producing the 4 links you see there.
How can I get this code to NOT be written to the page when segment_3 is one of these categories: “C11|C12|C13|C14|C15”
For clarification:
“practice_areas” is a weblog. It has these categories:
C10|C11|C12|C13|C14|C15
C10 is the “real estate tax incentives programs” link in the dropdown menu under “practice areas” in the top nav, and it has 4 entries in it (the ones that are being written by the code inside the conditional). The other links
The other categories in the “practice areass” blog are accessed by the rest of the links in that dropdown menu.
Thanks!
Rory