Page 1 of 2
{NAV_LIST_TOP} -- bug or misunderstanding on my part?
Posted: Thu 26. Feb 2004, 05:22
by tyr
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?
same bug
Posted: Sun 14. Mar 2004, 17:27
by thesilbi
Hi,
I have the same bug.
Please answer !
Re: same bug
Posted: Fri 7. May 2004, 00:08
by oli
thesilbi wrote:Hi,
I have the same bug.
Please answer !
yes, me too!
could some of you php-developers please be so kind to solve this problem?
it´s urgent...
thanx
oli
Posted: Fri 7. May 2004, 20:00
by Oliver Georgi
sorry - it's true. Not really a bug - but there is no checking for this. I will include such check - but does need some days.
Oliver
Posted: Mon 17. May 2004, 12:15
by cyrilo
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
Code: Select all
$breadcrumb = get_breadcrumb(key($struct_path), $struct);
and changed
------------
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\"";
to
Code: Select all
$css_list .= (!$struct_path[$key]) ? "" : " id=\"".$class."_active_link\"";
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
Posted: Mon 17. May 2004, 17:52
by Oliver Georgi
Good work,
I have implemented your enhancement.
Available via CVS.
Same has to be done for the NAV_ROW.
I will check as soon as possible.
regards
Oliver
Posted: Mon 17. May 2004, 20:18
by frjones
i think you mixed up those two lines:
changed
Code: Select all
$css_list .= (!$breadcrumb[$key]) ? "" : " id=\"".$class."_active_link\"";
to
Code: Select all
$css_list .= (!$struct_path[$key]) ? "" : " id=\"".$class."_active_link\"";
i think it should be :
changed
Code: Select all
$css_list .= (!$struct_path[$key]) ? "" : " id=\"".$class."_active_link\"";
to
Code: Select all
$css_list .= (!$breadcrumb[$key]) ? "" : " id=\"".$class."_active_link\"";
this way it works on my system.
oh and, nice work.
Posted: Mon 17. May 2004, 20:55
by Oliver Georgi
I did so
New file is available at SourceForge CVS
here
Oliver
Posted: Mon 17. May 2004, 21:17
by Alexander Schlegel
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
Posted: Mon 17. May 2004, 21:20
by Oliver Georgi
Da hast Du wohl was falsch gemacht.
Gruß
Oliver
Posted: Mon 17. May 2004, 21:23
by Alexander Schlegel
Oliver Georgi wrote:Da hast Du wohl was falsch gemacht.
Gruß
Oliver
Aha, was kann man denn beim Austauschen der Dateien und dem Aufspielen der neuen falsch machen?
Gruß
Alexander
Posted: Mon 17. May 2004, 21:28
by Oliver Georgi
Sieht aus, als ob Dein System nicht ganz aktuell war und irgendein Hack da was kaputtmacht.
Oliver
Posted: Mon 17. May 2004, 21:32
by Oliver Georgi
Ich weiß, wo das Problem liegt:
rewrite wurde von mir überarbeitet.
Also immer schön "alle" Dateien aktualisieren.
Oder manuell die
Änderung durchführen.
Oliver
Posted: Mon 17. May 2004, 21:33
by Alexander Schlegel
Oliver Georgi wrote:Sieht aus, als ob Dein System nicht ganz aktuell war und irgendein Hack da was kaputtmacht.
Oliver
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.
Sonst hab ich ich nicht mehr gemacht, heiliges Indianer-Ehrenwort ...
Gruß
Alexander
Posted: Mon 17. May 2004, 21:34
by Alexander Schlegel
Oliver Georgi wrote:Ich weiß, wo das Problem liegt:
rewrite wurde von mir überarbeitet.
Also immer schön "alle" Dateien aktualisieren.
Oliver
Ok, dann wirds schon klarer ...
Gruß
Alexander
<nachtrag>Manuell gings jetzt, schön ...
</nachtrag>