This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » switches and correct use of template...
expandshrink

switches and correct use of template operators

switches and correct use of template operators

Thursday 07 April 2005 8:29:48 pm - 1 reply

Hi all,

I haven't used ez for a while and I'm struggling a bit with my switches. Does anyone know what I need to change to get it to recognise my template operators (is_integer and is_float)?

{section loop=$image_list}
    {switch match=true}
        {case match=is_integer($count|div(2))}
	   [code]
	{/case}
        {case match=is_float($count|div(2))}
	   [code]
	{/case}
    {/switch}
    {set count=$count|inc}
{/section}

At the moment it tells me all instances of $count / 2 are floats, even though some of them are really integers... When I use them outside of the loop I find that I have both floats and integers...

I'm running ezp 3.5.1, if that's relevant.

Wednesday 13 April 2005 9:28:33 am

Hi James,

You can use if condition

{*
    if true display code
*}
{section show=true}
    [code]
{*
    if not true display something else
*}
{section-else}
    [code]
{/section}
expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from