{NAV_LIST_TOP} -- bug or misunderstanding on my part?

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
tyr
Posts: 31
Joined: Tue 9. Dec 2003, 04:36
Location: Pennsylvania, USA

{NAV_LIST_TOP} -- bug or misunderstanding on my part?

Post 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?
thesilbi
Posts: 14
Joined: Mon 23. Feb 2004, 21:32

same bug

Post by thesilbi »

Hi,

I have the same bug.
Please answer ! 8) 8)
oli
Posts: 46
Joined: Thu 6. May 2004, 23:58

Re: same bug

Post by oli »

thesilbi wrote:Hi,

I have the same bug.
Please answer ! 8) 8)
:?: yes, me too!
could some of you php-developers please be so kind to solve this problem?
it´s urgent... :(
thanx
oli
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cyrilo
Posts: 9
Joined: Mon 17. May 2004, 11:57

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
frjones
Posts: 5
Joined: Sun 9. May 2004, 18:30

Post 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.
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

I did so ;-)

New file is available at SourceForge CVS here

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Alexander Schlegel
Posts: 108
Joined: Fri 10. Oct 2003, 15:11
Location: München
Contact:

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Da hast Du wohl was falsch gemacht. ;-)

Gruß
Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Alexander Schlegel
Posts: 108
Joined: Fri 10. Oct 2003, 15:11
Location: München
Contact:

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Sieht aus, als ob Dein System nicht ganz aktuell war und irgendein Hack da was kaputtmacht.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Alexander Schlegel
Posts: 108
Joined: Fri 10. Oct 2003, 15:11
Location: München
Contact:

Post 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
Alexander Schlegel
Posts: 108
Joined: Fri 10. Oct 2003, 15:11
Location: München
Contact:

Post 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>
Locked