A Problem with mytmplate
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue Feb 14, 2012 11:30 am
A Problem with mytmplate
hello ...
I have a template and it work good until I made a change in the menu . I create a new menu for side bar and the top menu does not work correctly !
karapost.com ... When we click on a certain part in menu , for example 'tracking' , its related page open but the top menu's button must be white ... but its not happen .
what must I done ?
I have a template and it work good until I made a change in the menu . I create a new menu for side bar and the top menu does not work correctly !
karapost.com ... When we click on a certain part in menu , for example 'tracking' , its related page open but the top menu's button must be white ... but its not happen .
what must I done ?
- spike1968
- Joomla! Explorer
- Posts: 427
- Joined: Fri Aug 25, 2006 2:39 pm
- Location: United Kingdom - Aldershot
- Contact:
Re: A Problem with mytmplate
Do you have a link to view the problem?
I may be wrong and I often am.
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue Feb 14, 2012 11:30 am
Re: A Problem with mytmplate
I Wrote it in first post : www.karapost.comspike1968 wrote:Do you have a link to view the problem?
- spike1968
- Joomla! Explorer
- Posts: 427
- Joined: Fri Aug 25, 2006 2:39 pm
- Location: United Kingdom - Aldershot
- Contact:
Re: A Problem with mytmplate
sorry missed it. looking at it now
I may be wrong and I often am.
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best
- spike1968
- Joomla! Explorer
- Posts: 427
- Joined: Fri Aug 25, 2006 2:39 pm
- Location: United Kingdom - Aldershot
- Contact:
Re: A Problem with mytmplate
If you take a look at 'view source' in your browser you will see that at line 102 the code
is shown for the Home link when you first enter the site.
When you click tracking or other links you will see that this code is missing.
You will need to add in the li for in your template html folder for mod_menu I would imagine but not 100% sure.
But that is why it won't display the way you want it to.
Code: Select all
<li class="active">
When you click tracking or other links you will see that this code is missing.
You will need to add
Code: Select all
class="active"
But that is why it won't display the way you want it to.
I may be wrong and I often am.
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue Feb 14, 2012 11:30 am
Re: A Problem with mytmplate
yes ... but I want dynamicly change It not static ! witch file I must change ?spike1968 wrote:If you take a look at 'view source' in your browser you will see that at line 102 the code
is shown for the Home link when you first enter the site.Code: Select all
<li class="active">
When you click tracking or other links you will see that this code is missing.
You will need to addin the li for in your template html folder for mod_menu I would imagine but not 100% sure.Code: Select all
class="active"
But that is why it won't display the way you want it to.
- spike1968
- Joomla! Explorer
- Posts: 427
- Joined: Fri Aug 25, 2006 2:39 pm
- Location: United Kingdom - Aldershot
- Contact:
Re: A Problem with mytmplate
That I cannot be 100% sure about unless I saw all the files for your site, it could be in you html folder in the template or it could be a core file in joomla code.
Do you have mod_menu listed in your html folder in your template... this can be found at root>template>[template name]>html
Do you have mod_menu listed in your html folder in your template... this can be found at root>template>[template name]>html
I may be wrong and I often am.
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue Feb 14, 2012 11:30 am
Re: A Problem with mytmplate
this is the relative function in theme :
function mosRecurseListMenu( $id, $level, &$children, $open, &$indents, $class_sfx, $highlight ) {
global $Itemid;
global $HTTP_SERVER_VARS;
if (@$children[$id]) {
$n = min( $level, count( $indents )-1 );
if ($level==0) echo '<ul onmouseover="check_id()">';
else
echo $indents[$n][0];
foreach ($children[$id] as $row) {
switch ($row->type) {
case 'separator':
$row->link = "javascript:;";
break;
case 'url':
if ($row->link == "javascript:;") {
$row->link = "javascript:;";
}
else {
$row->link .= "";
}
break;
default:
$row->link .= "&Itemid=$row->id";
break;
}
$li = "\n".$indents[$n][1] ;
$current_itemid = trim( JRequest::getVar( 'Itemid', 0 ) );
if ($row->link != "seperator" &&
$current_itemid == $row->id ||
$row->id == $highlight ||
(JRoute::_( substr($_SERVER['PHP_SELF'],0,-9) . $row->link)) == $_SERVER['REQUEST_URI'] ||
(JRoute::_( substr($_SERVER['PHP_SELF'],0,-9) . $row->link)) == $HTTP_SERVER_VARS['REQUEST_URI']) {
if ($row->type != "url") {
$li = "<li class=\"active\">";
}
}
echo $li.$row->type;
echo mosGetLink( $row, $level, $class_sfx );
mosRecurseListMenu( $row->id, $level+1, $children, $open, $indents, $class_sfx, "" );
echo $indents[$n][2];
}
echo "\n".$indents[$n][3];
}
}
function mosRecurseListMenu( $id, $level, &$children, $open, &$indents, $class_sfx, $highlight ) {
global $Itemid;
global $HTTP_SERVER_VARS;
if (@$children[$id]) {
$n = min( $level, count( $indents )-1 );
if ($level==0) echo '<ul onmouseover="check_id()">';
else
echo $indents[$n][0];
foreach ($children[$id] as $row) {
switch ($row->type) {
case 'separator':
$row->link = "javascript:;";
break;
case 'url':
if ($row->link == "javascript:;") {
$row->link = "javascript:;";
}
else {
$row->link .= "";
}
break;
default:
$row->link .= "&Itemid=$row->id";
break;
}
$li = "\n".$indents[$n][1] ;
$current_itemid = trim( JRequest::getVar( 'Itemid', 0 ) );
if ($row->link != "seperator" &&
$current_itemid == $row->id ||
$row->id == $highlight ||
(JRoute::_( substr($_SERVER['PHP_SELF'],0,-9) . $row->link)) == $_SERVER['REQUEST_URI'] ||
(JRoute::_( substr($_SERVER['PHP_SELF'],0,-9) . $row->link)) == $HTTP_SERVER_VARS['REQUEST_URI']) {
if ($row->type != "url") {
$li = "<li class=\"active\">";
}
}
echo $li.$row->type;
echo mosGetLink( $row, $level, $class_sfx );
mosRecurseListMenu( $row->id, $level+1, $children, $open, $indents, $class_sfx, "" );
echo $indents[$n][2];
}
echo "\n".$indents[$n][3];
}
}