The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: A Problem with mytmplate
PostPosted: Tue Feb 14, 2012 11:43 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Feb 14, 2012 11:30 am
Posts: 4
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 ?


Top
 Profile  
 
PostPosted: Tue Feb 14, 2012 1:27 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Aug 25, 2006 2:39 pm
Posts: 426
Location: United Kingdom - Aldershot
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


Top
 Profile  
 
PostPosted: Tue Feb 14, 2012 1:49 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Feb 14, 2012 11:30 am
Posts: 4
spike1968 wrote:
Do you have a link to view the problem?


I Wrote it in first post : www.karapost.com


Top
 Profile  
 
PostPosted: Tue Feb 14, 2012 1:54 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Aug 25, 2006 2:39 pm
Posts: 426
Location: United Kingdom - Aldershot
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


Top
 Profile  
 
PostPosted: Tue Feb 14, 2012 2:06 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Aug 25, 2006 2:39 pm
Posts: 426
Location: United Kingdom - Aldershot
If you take a look at 'view source' in your browser you will see that at line 102 the code

Code:
<li class="active">


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
Code:
class="active"
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.

_________________
I may be wrong and I often am.
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best


Top
 Profile  
 
PostPosted: Wed Feb 15, 2012 1:07 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Feb 14, 2012 11:30 am
Posts: 4
spike1968 wrote:
If you take a look at 'view source' in your browser you will see that at line 102 the code

Code:
<li class="active">


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
Code:
class="active"
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.


yes ... but I want dynamicly change It not static ! witch file I must change ?


Top
 Profile  
 
PostPosted: Wed Feb 15, 2012 4:58 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Aug 25, 2006 2:39 pm
Posts: 426
Location: United Kingdom - Aldershot
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

_________________
I may be wrong and I often am.
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best


Top
 Profile  
 
PostPosted: Thu Feb 16, 2012 2:35 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Feb 14, 2012 11:30 am
Posts: 4
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];



}

}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 



Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group