{NAV_LIST_TOP} -- bug or misunderstanding on my part?
{NAV_LIST_TOP} -- bug or misunderstanding on my part?
I am using the tabbed horizontal navigation for my main site navigation. For the first structural level everything works well. When I click on the tab I am taken to the correct page and the tab changes colors to indicate where I am.
However, when I follow a link to a sub-category the NAV_LIST_TOP highlights the Home tab rather than the parent category's tab.
For example, I have two categories under the main index (website start): History and About Us, each with sub-categories containing articles. The "History" tab takes me to the main article in the History category and is highlighted. A link to the History sub-category "1850" takes me to the correct article, but the "History" tab is no longer highlighted. Rather, the Home tab is now highlighted.
I would like for the tab to remain highlighted for all articles under the parent structural level. In my example, I want visitors to know that the "1850" article is in the "History" section of the site.
Is this the way the NAV_LIST_TOP menu/navigation was intended to act, or am I doing something wrong? I can always hardcode the menu, but that defeats the purpose of the dynamic content.
Anyone have an idea?
However, when I follow a link to a sub-category the NAV_LIST_TOP highlights the Home tab rather than the parent category's tab.
For example, I have two categories under the main index (website start): History and About Us, each with sub-categories containing articles. The "History" tab takes me to the main article in the History category and is highlighted. A link to the History sub-category "1850" takes me to the correct article, but the "History" tab is no longer highlighted. Rather, the Home tab is now highlighted.
I would like for the tab to remain highlighted for all articles under the parent structural level. In my example, I want visitors to know that the "1850" article is in the "History" section of the site.
Is this the way the NAV_LIST_TOP menu/navigation was intended to act, or am I doing something wrong? I can always hardcode the menu, but that defeats the purpose of the dynamic content.
Anyone have an idea?
Re: same bug
yes, me too!thesilbi wrote:Hi,
I have the same bug.
Please answer !
could some of you php-developers please be so kind to solve this problem?
it´s urgent...
thanx
oli
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Here is the modification what I made
in file include/inc_front/front.func.inc.php
I'm not sure about line numbers
I have changed a bit function css_list_top
I have added
and changed
------------
------------
to
------------
------------
Also changed
to
So $struct_path is not longer in use.
But now the navigation level is highlited when you select navigation that is under it.
Well someone can test it as well
//BR
Cyrilo
in file include/inc_front/front.func.inc.php
I'm not sure about line numbers
I have changed a bit function css_list_top
I have added
Code: Select all
$breadcrumb = get_breadcrumb(key($struct_path), $struct);
------------
Code: Select all
if($struct_path[$key]) {
$css_list .= " id=\"".$class."_active\"";
$activated = 1;
}
to
------------
Code: Select all
if($breadcrumb[$key]) {
$css_list .= " id=\"".$class."_active\"";
$activated = 1;
}
Also changed
Code: Select all
$css_list .= (!$breadcrumb[$key]) ? "" : " id=\"".$class."_active_link\"";
Code: Select all
$css_list .= (!$struct_path[$key]) ? "" : " id=\"".$class."_active_link\"";
But now the navigation level is highlited when you select navigation that is under it.
Well someone can test it as well
//BR
Cyrilo
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
i think you mixed up those two lines:
changed
to
this way it works on my system.
oh and, nice work.
i think it should be :changed
toCode: Select all
$css_list .= (!$breadcrumb[$key]) ? "" : " id=\"".$class."_active_link\"";
Code: Select all
$css_list .= (!$struct_path[$key]) ? "" : " id=\"".$class."_active_link\"";
changed
Code: Select all
$css_list .= (!$struct_path[$key]) ? "" : " id=\"".$class."_active_link\"";
Code: Select all
$css_list .= (!$breadcrumb[$key]) ? "" : " id=\"".$class."_active_link\"";
oh and, nice work.
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
-
- Posts: 108
- Joined: Fri 10. Oct 2003, 15:11
- Location: München
- Contact:
I have changed the file, but it doesn`t work.
If You want to take a look: http://www.kafka.nezzgo.com/prag_anfang.shtml
Greetings,
Alexaneder
If You want to take a look: http://www.kafka.nezzgo.com/prag_anfang.shtml
Greetings,
Alexaneder
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
-
- Posts: 108
- Joined: Fri 10. Oct 2003, 15:11
- Location: München
- Contact:
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
- Oliver Georgi
- Site Admin
- Posts: 9900
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
-
- Posts: 108
- Joined: Fri 10. Oct 2003, 15:11
- Location: München
- Contact:
Hmm, ich teste bislang die Version 1.1-RC4 ohne jeglichen Hack. Ich hatte genau das geschilderte Problem wie die anderen und die Navigationen funktionierten bislang, nur dass eben die Top-Navi den Home-Button irrtümlich aktivierte.Oliver Georgi wrote:Sieht aus, als ob Dein System nicht ganz aktuell war und irgendein Hack da was kaputtmacht.
Oliver
Sonst hab ich ich nicht mehr gemacht, heiliges Indianer-Ehrenwort ...
Gruß
Alexander
-
- Posts: 108
- Joined: Fri 10. Oct 2003, 15:11
- Location: München
- Contact: