Hi,
I have the following code that I am trying to use to decipher if I am on a category URL or not and show a single entry depending on that URL. The URL structure is just /news or /news/products for example
{if segment_2 == ""}
<!-- Any news entry here -->
{exp:channel:entries channel="news" limit="1"}
{/if}
{if segment_2 != ""}
<!-- Specific category news entry here -->
{exp:channel:entries channel="news" limit="1" category="{segment_2_category_id}"}
{/if}
<!-- Code to display the entry stuff here -->
{/exp:channel:entries}So I check if segment_2 exists. If it does I pull from the given category using segment_2_category_id from the Low Seg2Cat extension. This works fine. But when I am trying to pull just from the news channel when no segment_2 is specified I get no entries back. Even if I enter a category in the tag that I know has entries I get nothing back. I have also put some debug code just after opening the entries tag and it definitely falls into that piece of code. Any ideas?
Thanks