i'm workin on some modification of the xdirectory module and i found a problem with the use of the || (or) logical operator on smarty.
i will be verbose, for all that people don't knowing this module :)
xdirectory pass to smarty templates the 'link' array, containing the two variables involved in the problem.
these variables are $link.logourl (containing the name of the logo image for a business entry) and $link.premium (that select some additional displaying features for a business entry).
if i try to set a logical operator like this, it does not work:
<{if $link.premium != "" || Slink.logourl != "0" }>
<img src="image_for_business_without_logo.jpg">
<{else}>
<img src="shots/<{$link.logourl}>">
<{endif}>
if i set only a 'if $link.premium or a 'if $link.logourl' conditional statement, this work fine, but setting both the variables as conditional, lets work only the $link.premium condition
more clearly, a business entry without a logo will show no image because the img tag will result like this:
<img src="shots/">
viceversa if i set a logical operators like this, it will work:
<{if $link.premium == "" || Slink.logourl == "0" }>
<img src="shots/<{$link.logourl}>">
<{else}>
<img src="image_for_business_without_logo.jpg">
<{endif}>
it seems to me very strange, but maybe there is something of smarty i didn't understand...
anyone can tell me if it is a problem of smarty or of the xoop's smarty implementation (o may be a my mistake?
)
Many thanx and sorry for my bad english
Max