Here is my template, simplified:
<div id="content-wrapper">
{exp:categoree parse="inward"}
{if total_files > 0}
<div id="content">
<div id="image">
{exp:get_image parse="inward"}
{exp:gallery:entries entry_id="{entry_id}" gallery="{gallery_name}"}
{image_url}
{/exp:gallery:entries}
{/exp:get_image}
</div> <!-- end image -->
</div> <!-- content -->
{if:else}
<div id="image">
woo hoo!!
</div> <!-- end image -->
</div> <!-- content -->
{/if}
{/exp:categoree}
</div> <!-- content-wrapper -->
My issue is when I am in the ‘else’ statement, the get_image plugin is still being called. I can tell because I see an error, “Notice: Undefined offset: 0 in /home/thedalzells.org/flibberflabber/plugins/pi.get_image.php on line 86”
Why is EE calling the plugin when it shouldn’t be?
The conditional seems to be something you’re testing against another plugin? the total_files?
{exp:categoree parse="inward"}
{if total_files > 0}
that’s something that you would need to look to your plugin for. I’m going to pop this down to the plugins technical forum for help with this.
Yes, the conditional works great. My question is, when total_files == 0, the {exp:get_image} is still being called, when it shouldn’t be, as it should only be called when total_files > 0.
When I turn on template debugging, I see that EE parses the tag and it must call the plugin as I am getting an error.
I have worked around this issue as both plugins are mine, but I would like to know why the plugin is getting called when it is in the FALSE side of the conditional.
Thanks
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.