[SOLVED] How to add a global content block to dropdown menu

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
blackhawk
Power Poster
Power Poster
Posts: 280
Joined: Mon Oct 20, 2008 6:07 pm

[SOLVED] How to add a global content block to dropdown menu

Post by blackhawk »

From cmsms 1.11.4, if we are using a copy of the standard cmsms menu simple_navigation.tpl, how can we append a global content block right after the following element...

Code: Select all

<ul class="unli"> 
...This way the code looks simular to this...

Code: Select all

...
<li>
<a class="menuparent" href="http://dev.mdt/index.php?page=nested-menu">...</a>
<ul class="unli">....</ul>
<div class="my-global-content-block">...</div>
 </li>
....
Thanks!
Last edited by blackhawk on Thu Apr 18, 2013 3:54 am, edited 1 time in total.
blackhawk
Power Poster
Power Poster
Posts: 280
Joined: Mon Oct 20, 2008 6:07 pm

Re: How to add a global content block to dropdown menu

Post by blackhawk »

I almost have it with something like this inside of cssmenu_ulshadow.tpl, which I am using as my {menu} in my template...

Code: Select all

....
{if $classes="menuparent"}
{global_content name='demo'}
{/if}

</li>
</ul>
<div class="clearb"></div>
</div>
{/if}
...
but how do i check for the parent li id selector name in my conditional statement? this way my block is under a certain menu tab, not all of them?

Thanks
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: How to add a global content block to dropdown menu

Post by velden »

can't work with the 'depth' variable which is used in the menu template?
blackhawk
Power Poster
Power Poster
Posts: 280
Joined: Mon Oct 20, 2008 6:07 pm

Re: How to add a global content block to dropdown menu

Post by blackhawk »

Thanks for the feedback velden, but I don't want just know the depth, but I want the know who daddy is :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How to add a global content block to dropdown menu

Post by Dr.CSS »

There is {$node->alias} and $node->id, look at menu template help when editing menu template...
blackhawk
Power Poster
Power Poster
Posts: 280
Joined: Mon Oct 20, 2008 6:07 pm

Re: How to add a global content block to dropdown menu

Post by blackhawk »

Thank you Dr. CSS, that helps me out!
Post Reply

Return to “The Lounge”