Home arrow Blog arrow Joomla MainMenu Caching

Joomla MainMenu Caching

E-mail
(3 votes)
Written by Rick Winkler   
Monday, 10 March 2008
Module PropertiesI have been using Joomla! as a content management system for some time now and have deployed several customer web sites using it. I test most products before recommending them to my customers. At the time of writing, this very site was using Joomla 1.5 RC4.

While testing, I encountered a weird issue with my template and the Main Menu at the top. When you hover over and item, the item background turns black. After you navigate to a section, Services for example, that section's menu item should continue to have a black background while you remain on that page.

With my site, this was not working. Sometimes Home would always stay highlighted, sometimes it would shift to another item and stay there. When the hightlighting would get "stuck", it would remain that way no matter where you navigated to on my site.

After several posts on the Joomla Forum, I found the culprit: Caching. Out of the box, Joomla 1.5 RC4's mainmenu module has its caching properties set "Use Global." When caching is globally enabled, the query results for the mainmenu would be cached from the frontpage (Home) and subsequent queries would be delivered from this cache. The results of the query which returned Home having id=”current” would be used repeatedly. The highlighting on my site is based off of this tag.

The fix was pretty simple. By navigating to Extensions > Module Manager in the Administrator panel for Joomla, we can override the cache settings for this module. Under Parameters in the properties of the module, select "Advanced Parameters" > Caching = No Caching.

A simple fix for a simple problem!
Bookmark This: 
Comments Add            Search            
0 0
simple yes!

just the answer i needed to my problem.. thanks
Add Comment
Name:
Comment:
 
Security Image
Please input the anti-spam code that you can read in the image.