Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

if with or, or somethings else ;-)


Reply

4 Posts   2298 Views

Avatar
UnrealMinds

12 May 2008 at 5:50am (Last edited: 16 May 2008 1:51am), Community Member, 8 Posts

Hello @all!

I have a simple menu, but I wanted to have some spaces between at some positions.

like:
***********
Home
<br />
Contact
Impress
<br />
News
***********

So, I have to inklude:
<% if Pos = 2 %>
<li style="height: 5px;">&nbsp;</li>
<% end_if %>

But for the secound spacer I wouldn't like to write:
<% if Pos = 4 %>
<li style="height: 5px;">&nbsp;</li>
<% end_if %>

How can I made this with only one if-statement?

<% if Pos = 2 || Pos = 4 %>
<% if (Pos = 2) || (Pos = 4) %>
<% if Pos = 2 or Pos = 4 %>
<% if (Pos = 2) or (Pos = 4) %>
has the only effect that the site will be blank. ;-)

Avatar
UnrealMinds

16 May 2008 at 1:52am Community Member, 8 Posts

does no one have an idea?

Avatar
Bruce B

16 May 2008 at 11:04am Community Member, 145 Posts

Are the breaks determined by the menu items themselves or just the position? If its the menu items, you could add a new field to the relevant page type called 'MenuSpace', then use the value of that field in your if statement to decide whether to insert a space above the item.

cheers
bruce

Avatar
UnrealMinds

16 May 2008 at 7:03pm Community Member, 8 Posts

Thanx, for this idea.

I will try to do so ;-)