Skip to content

Instantly share code, notes, and snippets.

@proweb proweb/default.php
Created Sep 28, 2011

Embed
What would you like to do?
Last and first classes MOD_MENU Joomla default.php
// Copy /modules/mod_menu/tmpl/default.php to /templates/MYTEMPLATE/html/mod_menu/default.php
// Around line 34, find:
if ($item->deeper) {
$class .= 'deeper ';
}
// Replace this with:
$currentitemcount ++;
if ($item->shallower or $currentitemcount == count($list)) {
$class .= 'last ';
}
if ($lastdeeper or $currentitemcount == 1) {
$class .= 'first ';
}
if ($item->deeper) {
$class .= 'deeper ';
$lastdeeper = true;
} else {
$lastdeeper = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.