Force Menu Item to be Active?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
schipper
Forum Members
Forum Members
Posts: 42
Joined: Wed Dec 17, 2008 8:45 pm

Force Menu Item to be Active?

Post by schipper »

I am trying to mirror my CMSMS site on a third party web store application. I've used iFrames to create the header and footer on their system.

Now, i'd like my "store" button to be highlighted in the nav bar, but it currently isn't because that is not the active (the actual STORE page is an external link to the page that contains the iFrames on my third party system)

Is there a way for me to "force" that link to be active? I am sure there is a way i can do this by inserting some "If" logic within my Menu code but i just dont know how to do that and am hoping someone can point me in the right direction.

Here is my current code for the menu:

Code: Select all

{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuparent - The class for each <li> that has children.
.menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}
<div id="menuwrapper">
<ul id="primary-nav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string='<ul class="unli">' times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string='</li></ul>' times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="menuactive menuparent">
<a class="menuactive menuparent" {elseif $node->current == true}
<li class="menuactive">
<a class="menuactive" {elseif $node->haschildren == true}
<li class="menuparent">
<a class="menuparent" {elseif $node->type == 'sectionheader' and $node->haschildren == true}
<li class="sectionheader"><span class="sectionheader">{$node->menutext}</span>{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="menu_separator" />{else}
<li>
<a {/if}
{if $node->type != 'sectionheader' and $node->type != 'separator'}
{if $node->target}target="{$node->target}" {/if}
href="{$node->url}" target="_top"><span>{$node->menutext}</span></a>
{elseif $node->type == 'sectionheader'}
><span class="sectionheader">{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string='</li></ul>' times=$node->depth-1}
</li>
</ul>
<div class="clearb"></div>
</div>
{/if}
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Force Menu Item to be Active?

Post by Dr.CSS »

It would help to actually see the site so we may be able to come up with a solution...
schipper
Forum Members
Forum Members
Posts: 42
Joined: Wed Dec 17, 2008 8:45 pm

Re: Force Menu Item to be Active?

Post by schipper »

Here is the testing site with the CMSMS program:
http://www.s1-38.utilitywebhosting.com/index.php

When you click on "STORE" button in middle, it takes you here, which is on the third-party platform (This may show as not secure since we havent set up the HTTPS yet):
https://www.s1-39.utilitywebhosting.com/index.php

I've used iFrames for the header and footer located here:
http://www.s1-38.utilitywebhosting.com/ ... age=header
http://www.s1-38.utilitywebhosting.com/ ... age=footer
schipper
Forum Members
Forum Members
Posts: 42
Joined: Wed Dec 17, 2008 8:45 pm

Re: Force Menu Item to be Active?

Post by schipper »

And i've set up this page to redirect to the Third party store URL:
http://www.s1-38.utilitywebhosting.com/ ... page=store
Post Reply

Return to “CMSMS Core”