Making JReviews Menus active when viewing listing detail pages
When someone views listing detail page, the JReviews Section/Category menu items will not became active.
That is because listings don't share the same ItemIds as JReviews Section/Category menu items.
Listings have the ItemIds of the Joomla Article Section/Category menu items.
You probably created those menu items in a Hidden Menu. If not, do that like instructed in this article: Using Joomla Core SEF - Creating Joomla Article Section/Category Menu Items (at the bottom of the article)
When you know the Ids of Hidden Joomla menu items and Ids of JReviews menu items, you can add a hack in the index.php file of your joomla template:
Open this file:
- root\templates\{your_template}\index.php
The first lines in the file probably look something like this:
<?php ( '_JEXEC' ) or die( 'Restricted index access' ); define( 'YOURBASEPATH', dirname(__FILE__) ); ?>
Add this hack above the closing php tag:
global $Itemid; $menu = &JSite::getMenu(); // Repeat for every JReviews menu that needs to become active if($Itemid == 125){ // example of the itemId of Joomla menu item $menu->_active = 48; // example of the itemId of JReviews menu item }
Now the JReviews menu item with Id 48 will become active when the listing detail page with itemId 125 is viewed.