Page 1 of 1

Show news when no submenu items are listed

Posted: Tue Oct 09, 2007 12:38 pm
by hypnootik
Hi

I have just installed my first CMSMS. Nice program :).
But I cant find the way to customize it to suit my needs.
I would like to display {news} when no submenu links are present.

I have menu placed in my template as fallows:

Code: Select all

 in top of the page - header : {menu template='simple_top_navigation.tpl' number_of_levels='1' collapse='1'}

Roght side of the page - {menu template='simple_navigation.tpl' start_level='2' collapse='0'}
I tried to set it in simple_navigation.tpl but when no menu items are listed from start_level=2 the CMS does not include the menu template at all.

So what do I have to change to get this thing working?  :)


Best regards and sorry for my poor english,

hypnootik

Re: Show news when no submenu items are listed

Posted: Wed Oct 10, 2007 10:02 pm
by hypnootik
Hi

Really could need some help here    ???


Thanks

Re: Show news when no submenu items are listed

Posted: Wed Oct 10, 2007 10:06 pm
by Dr.CSS
Sounds like you need an {if} statement in your template, you could just put the {news} under where you put the menu tag that way it will be there one way or the other...

Re: Show news when no submenu items are listed

Posted: Thu Oct 11, 2007 9:53 am
by hypnootik
Thanks for Your reply.


I tried putting the {news} tag inside {if} statement in main template but could't find the right term to use for {if}.


:)

Re: Show news when no submenu items are listed

Posted: Tue Oct 16, 2007 11:59 am
by hypnootik
Hi again!

I have searched the forum for 4 hours and still stuck in the same thing.
Should I have something like this in my main template?

"MAIN TEMPLATE.tpl"

Code: Select all

<div id=Top_links>
            {menu template='simple_top_menu' number_of_levels='1' collapse='1'}
</div>

<div id=rightbar>

{if ??? checking if there are any menuitems in level 2 ???? }
            {menu template='proovikas' start_level='2' collapse='0'}
{else}
            {news}
{/if}
</div>
What should be the parameter inside  IF statement???
If there is no items starting from second level the menutemplate will not be loaded at all.


Appreciate any help.

Thanks

Re: Show news when no submenu items are listed

Posted: Fri Oct 19, 2007 6:10 am
by hypnootik
Isn't there any solution for this ?


???

Re: Show news when no submenu items are listed

Posted: Sun Oct 21, 2007 1:08 am
by Dr.CSS
I don't know how to write {if} statements and a search of the forum for {if} shows an error?...