So I finally managed to get going with the templates and displaying results coming from my module.
The new brick wall is checking if the returned data was empty or not.
I’m unable to detect if the returned data was empty or not, here is what I have:
{exp:cities:list}
{city_info}
// the title is there and showing on the page
<h1>{title}</h1>
// this if statement does nothing
{if title !=''}
the title was echoed
{/if}
{/city_info}
{/exp:cities:list}I also tried this:
{exp:cities:list}
// if I put this if statement here, even when there is a city_info it does not show it anymore
{if city_info !=''}
{city_info}
// the title is there and showing on the page
<h1>{title}</h1>
// this if statement does nothing
{if title !=''}
the title was echoed
{/if}
{/city_info}
{/if}
{if city_info==''}
<h1>Sorry, no info about this city</h1>
{/if}
{/exp:cities:list}The question is:
How can I do a SIMPLE checking if (array, single variable, returned data) exist or not??
This is so frustrating ! It is as if I’m learning to crawl all over again after being the world champion in running !!