[SOLVED] How check that second level menu is displayed?

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
bunak
Forum Members
Forum Members
Posts: 75
Joined: Mon Sep 10, 2007 1:58 pm
Location: Pardubice

[SOLVED] How check that second level menu is displayed?

Post by bunak »

Hi all,
I am newbie in CMSMS and I need Your help.
I have very simple template, part of it is here:

Code: Select all

		<div class="menuhorni">
         <h2 class="accessibility">Navigace</h2>
         {menu template='simple_navigation.tpl' number_of_levels="1" collapse='1'}
		</div>
		<!-- /menu horni -->
	</div>
	<div class="drobek">
		Jste zde: {breadcrumbs starttext='' root='dom?' delimiter='»'}
		 <hr class="accessibility" />
	</div>
	<div class="levy">

         <h2>{title}</h2>
         {content} <br />
	
	</div>
	<div class="pravy">
--------------------------------------------------------------------------------------------------------------------------------
if{menu below is displayed}
   <h2>Menu header</h2>
{/if}
--------------------------------------------------------------------------------------------------------------------------------      
	 {menu template='simple_navigation.tpl' start_level="2" collapse='1'}

         <h2>Novinky</h2>
           <div class="sedivy">
             {news number='2' detailpage='news' category='General'}
           </div>

and I need help with conditionally displayed part of page. ( part between -------)
Is there in CMSMS menu module any variable, which say, that menu below this part was displayed? I need display Menu header only if  menu below is displayed.

look at: http://www.pkcomp.cz/cz/index.php/triline
on right column there is menu item "Ceník služeb Triline" which need header something like Menu.

Thanks for Your help


I have rewrite action.default in Menu module. Added new variable which show actual menu level
Last edited by bunak on Fri Jan 04, 2008 1:26 pm, edited 1 time in total.
hexdj
Power Poster
Power Poster
Posts: 415
Joined: Sat Mar 24, 2007 8:28 am

Re: [SOLVED] How check that second level menu is displayed?

Post by hexdj »

I am not 100% sure what you're trying to accomplish.
Did you try editing the MENU TEMPLATE, you find it by going to Layout > Menu Manager and find your template in there, and you can edit it. To find out what Variables are available in your template add the following to your MENU Template

Code: Select all

{get_template_vars}
Post Reply

Return to “Developers Discussion”