I have the following code:
<div id="sidebar">
{exp:categoree parse="inward"}
{exp:gallery:entries gallery="{gallery_name}" orderby="date" sort="desc" columns="10" rows="1"}
{entries}
{row_start} {/row_start}
{row}
<div class="thumbnail">
{if width > height}
<div class="landscape">
<a href="#" onclick="return getLandscapeImage('placeholder','{image_url}');">{exp:imgsizer:size src="{image_url}" width="{thumb_size}" alt="{title}" }</a>
</div>
{if:else}
<div class="portrait">
<a href="#" onclick="return getPortraitImage('placeholder','{image_url}');">{exp:imgsizer:size src="{image_url}" height="{thumb_size}" alt="{title}" }</a>
</div>
{/if}
</div> <!-- thumbnail -->
{/row}
{row_blank} {/row_blank}
{row_end} {/row_end}
{/entries}
{paginate}
<div class="paginate">
{pagination_links}
</div> <!-- paginate -->
{/paginate}
{/exp:gallery:entries}
{/exp:categoree}
</div> <!-- sidebar -->
I am author of the categoree plugin and when no tags are used it should return ”.
But when I look at my template, none of code in the ‘sidebar’ div is displayed!
If I do put in a categoree tag ($num_entries), then all works well.
Is this normal?
I am trying to get the $num_entries (return by categoree) used in a conditional, but I am having some difficulty.
Thanks
Mod Edit: Moved to the Plugins: Technical Assistance forum.
Thanks to the super-patience of Mr. Jones, I have worked through this issue.
I had two things wrong with my code: 1) I needed to use $FNS->prep_conditionals so that the conditionals worked at all 2) I need to make sure that the data in my results array matches the conditional I am testing. I was checking ‘num_entries’, but the data in the results array was ‘total_files’ so it wasn’t getting picked up.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.