Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Template switches but menu items siill showing up for the same rule

Re: Template switches but menu items siill showing up for the same rule

Ok, I FINALLY tracked down the issue - this was fiendishly complicated!

The issue is that Joomla's mod_menu module caches it's version of the menu structure for each "active menu item" and for each combination of user groups (including "public").

On your site, most of the main menu items are either "external URLs" (which don't have Itemids) or direct links to articles. AceSEF further complicates this. I see that in AceSEF, the direct links to articles don't have Itemids.

Now, because there's no Itemid, I think this causes there to be no "Active menu item". Therefore, the menu structure was getting cached using the same cache for every page, therefore overriding the changes that Chameleon was making.

Until I build this work-around (cache-buster) into Chameleon, you can use this in the PHP action (either succeed or fail) -- wherever you disable menu items:

Code:

$app1 = JFactory::getApplication();

$menu1 = $app1->getMenu();

// If no active menu, use default
$active = ($menu1->getActive()) ? $menu1->getActive() : $menu1->getDefault();

$user1 = JFactory::getUser();
$levels = $user1->getAuthorisedViewLevels();
asort($levels);
$key = 'menu_items'.$params.implode(',', $levels).'.'.$active->id;
$cache = JFactory::getCache('mod_menu', '');
$cache->clean();

Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1682
Total Polls:
6
Total Posts:
5938
Dormant:
User Info:
 
Total Users:
5861
Newest User:
dale4152801
Members Online:
0
Guests Online:
72

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked