21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 883 Views |
-
if clouse: sintax error

16 December 2009 at 4:27am Last edited: 16 December 2009 5:52am
Hi!
In my .ss page I wrote this line of code. My proble is apply an if clouse to every div.
For example :
if $Name != '' then show div else go on.
Can you hel me write this in a correct way please?My <% if $Nome !='' %> is not correct
<% if Conn %>
<ul id="product">
<% control Conn %>
<li>
<% if $Nome !='' %><div class="nome_query_2"> $Nome </div><% end_if %>
<% if $Type !='' %><div class="nome_query_2"> $Type </div> <% end_if %>
</li>
<% end_control %>
</ul>
<% end_if %>And if I need an or clouse?for example <% if $Nome !='' or $Type !='' %> what is the correct syntax?
Thanks! -
Re: if clouse: sintax error

16 December 2009 at 9:05am
You cannot use != '' in the template parser. In your case you are just checking that Name exists, which you should just be able to do <% if Name %>
| 883 Views | ||
|
Page:
1
|
Go to Top |


