?
avatar rajmohanvy
rajmohanvy
1 Jun 2017

Hi team,

I'm override the menu modules, please let me know is that correct or not.

Line : 35
Location : /var/www/joomla/modules/mod_menu/tmpl/
File : default.php

if (in_array($item->id, $path))
{
    $class .= ' active';
}

Replaced with

if (in_array($item->id, $path) && $item->type != 'alias')
{
    $class .= ' active';
}

Line : 35
Location : /var/www/joomla/modules/mod_menu/tmpl/
File : default.php

if (count($path) > 0 && $aliasToId == $path[count($path) - 1])
{
	$class .= ' active';
}
elseif (in_array($aliasToId, $path))
{
	$class .= ' alias-parent-active';
}

Replaced with

    if (count($path) > 0 && $item->id == $path[count($path) - 1])
{
	$class .= ' active';
}
elseif (in_array($aliasToId, $path))
{
	$class .= ' alias-parent-active';
}

Line : 53
Location : /var/www/joomla/modules/mod_menu/tmpl/
File : default_url.php

echo JHtml::_('link', JFilterOutput::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes);

Replaced with

$link = JUri::base(true).'/index.php/'.$item->alias;

echo JHtml::_('link', JFilterOutput::ampReplace(htmlspecialchars($link, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes);

avatar rajmohanvy rajmohanvy - open - 1 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Jun 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Jun 2017
Category com_menus
avatar zero-24
zero-24 - comment - 1 Jun 2017

This here is not a support forum for custom code. Please ask such questions in the forum at forum.joomla.org or the development mailing lists:
https://groups.google.com/forum/m/#!forum/joomla-dev-general

The other way around would be just try it out ;)

avatar zero-24 zero-24 - change - 1 Jun 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-06-01 08:00:25
Closed_By zero-24
avatar zero-24 zero-24 - close - 1 Jun 2017

Add a Comment

Login with GitHub to post a comment