Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hello!

I have tried out a piece of code:
Code: Select all
<cms:if "<cms:not_empty phone_number />" ><cms:get_custom_field 'phone_number' masterpage='globals.php' /> &bull; </cms:if>
and I'm not terribly surprised that it doesn't work.

I have previously used cms:not_empty within the cms:pages tag - but getting a data item using cms:get_custsom_field obviously works differently. Is there a way to check for a global data item being there or not?
Hi Potato,

Please try the following:
Code: Select all
<cms:set phone_number = "<cms:get_custom_field 'phone_number' masterpage='globals.php' />" />
<cms:if "<cms:not_empty phone_number />" >
   <cms:show phone_number /> &bull;
</cms:if>

Does this help?
ah yes, the cms:set tag - lovely, thank you - job done!
3 posts Page 1 of 1