{NAV_ROW} frontend menu status

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
blutch
Posts: 23
Joined: Tue 8. Mar 2005, 15:20

{NAV_ROW} frontend menu status

Post by blutch »

Hello,

I was already warnt about the {NAV_ROW:INT:0} tag displaying hidden structure levels. This however only happens when you open an article inside that hidden level : http://www.madpro.co.za/site/index.php?id=11,7,0,0,1,0.

My simple question: isn't there a single way to fix this??! I don't want to use {NAV_LIST_TOP} because of the listing of home .

Thanking in advance, Reinoud
jscholtysik

Post by jscholtysik »

Hi all,


I have a similar problem:

at my site

http://www.scholtysik.net/cms/index.php

I have a Suche (search) link at the right top side and a NAV_ROW menu at the footer. When I click at it, the search content appears, but also Suche appears within the NAV_ROW, although the structure level status is hidden... :-( How can I correct this?

-------------------------------------------------------------------------------------

Hi zusammen,

auf meiner Seite

http://www.scholtysik.net/cms/index.php

have ich einen Suche Link rechts oben und ein NAV_ROW Menü im Footer. Wenn ich auf Suche klicke, erscheint der Suche-Inhalt, aber Such erscheint auch im NAV_ROW Menü, obwohl der Status dieser Strukturebene "versteckt" ist. Wie kann ich diesen Bug beheben?


Joachim
blutch
Posts: 23
Joined: Tue 8. Mar 2005, 15:20

Post by blutch »

Hello, I would like to adress the issue ones more, in the hope that somebody will help us out on his one!
jscholtysik

Post by jscholtysik »

Hi blutch,


I will write an email to Oliver Georgi concerning this bug.


Joachim
blutch
Posts: 23
Joined: Tue 8. Mar 2005, 15:20

Post by blutch »

jscholtysik wrote:Hi blutch, I will write an email to Oliver Georgi concerning this bug. Joachim
Tnx a lot, appreciate it.
jscholtysik

Post by jscholtysik »

Hi blutch,

I have got a solution for the NAV_ROW problem:

Look for this code fragment in front.func.inc.php:

Code: Select all

foreach($GLOBALS['content']['struct'] as $key => $value) {
         //2005-03-28 Oliver Georgi
         //if($GLOBALS['content']['struct'][$key]["acat_struct"] ==  
$act_cat_id && $key != $act_cat_id && !$GLOBALS['content']['struct'] 
[$key]['acat_hidden']) {
         //also show when selected structure is hidden but is within  
selected tree
         if($GLOBALS['content']['struct'][$key]["acat_struct"] ==  
$act_cat_id && $key != $act_cat_id


             && (!$GLOBALS['content']['struct'][$key]['acat_hidden']  
|| isset($GLOBALS['LEVEL_KEY'][$key]))) {
There is a commented line:

Code: Select all

//if($GLOBALS['content']['struct'][$key]["acat_struct"] ==  
$act_cat_id && $key != $act_cat_id && !$GLOBALS['content']['struct'] 
[$key]['acat_hidden']) {
uncomment it and comment the following lines:

Code: Select all

if($GLOBALS['content']['struct'][$key]["acat_struct"] ==  
$act_cat_id && $key != $act_cat_id


             && (!$GLOBALS['content']['struct'][$key]['acat_hidden']  
|| isset($GLOBALS['LEVEL_KEY'][$key]))) {
and you're done!!

Have fun and thanks to Oliver Georgi for the prompt response... :-)


Joachim
User avatar
Paradroid
Posts: 176
Joined: Fri 19. Mar 2004, 13:14
Location: Wuppertal
Contact:

Post by Paradroid »

Hi Joachim,

I checked the corresponding lines for {NAV_TABLE_COLUMN} and found the code, but this didn't solve the problem, the hidden site structures keep appearing in my navigation :cry:

Achim
ParaDroid

knquadrat edv + marketing
http://www.knquadrat.de

phpWCMS Dokumentation | Deutsch | English
spuutum
Posts: 9
Joined: Thu 18. Aug 2005, 08:51
Location: Tallinn, Estonia

Post by spuutum »

I have the same problem with {NAV_TABLE_COLUMN} tag.
blutch
Posts: 23
Joined: Tue 8. Mar 2005, 15:20

Post by blutch »

With the help of Joachim Scholtysik I was able to fix the problem, described in the first post. An extension of Joachims posts with a few more clues:

Find the file front.func.inc.php in the folder include/inc_front/ and look for the following code at line 934:

Code: Select all

foreach($GLOBALS['content']['struct'] as $key => $value) { 
      //2005-03-28 Oliver Georgi 
      //if($GLOBALS['content']['struct'][$key]["acat_struct"] == $act_cat_id && $key != $act_cat_id && !$GLOBALS['content']['struct'][$key]['acat_hidden']) { 
      //also show when selected structure is hidden but is within selected tree 
      if($GLOBALS['content']['struct'][$key]["acat_struct"] == $act_cat_id && $key != $act_cat_id 
         && (!$GLOBALS['content']['struct'][$key]['acat_hidden'] || isset($GLOBALS['LEVEL_KEY'][$key]))) {
What you have to do now is very simple. "Uncomment" the following line by removing the two slashes //:

Code: Select all

//if($GLOBALS['content']['struct'][$key]["acat_struct"] == $act_cat_id && $key != $act_cat_id && !$GLOBALS['content']['struct'][$key]['acat_hidden']) { 
"Comment" the following lines by placing two slashes // before them::

Code: Select all

if($GLOBALS['content']['struct'][$key]["acat_struct"] == $act_cat_id && $key != $act_cat_id 
         && (!$GLOBALS['content']['struct'][$key]['acat_hidden'] || isset($GLOBALS['LEVEL_KEY'][$key]))) {
You're new code should look as follows:

Code: Select all

foreach($GLOBALS['content']['struct'] as $key => $value) {
		//2005-03-28 Oliver Georgi
		if($GLOBALS['content']['struct'][$key]["acat_struct"] == $act_cat_id && $key != $act_cat_id && !$GLOBALS['content']['struct'][$key]['acat_hidden']) {
		//also show when selected structure is hidden but is within selected tree
		//if($GLOBALS['content']['struct'][$key]["acat_struct"] == $act_cat_id && $key != $act_cat_id 
			//&& (!$GLOBALS['content']['struct'][$key]['acat_hidden'] || isset($GLOBALS['LEVEL_KEY'][$key]))) {


Many thanks to Oliver Georgi and Joachim Scholtysik!
MPerio
Posts: 10
Joined: Sun 9. Oct 2005, 19:22

Post by MPerio »

(German version at the end : Deutsche Version am Ende)

For all where this solution don't work.

Here a workaround:
Use the {NAV_TABLE_COLUMN:X} Replacement-Tag to show only your "Main-Menue"

+Home
..+MainMenue <-- show only this section
......+Entry1
......+Entry2
......+etc
..+Search <- never shown in menu now
..+Sitemap <- never shown in menu now

Thanks to cwenet for this hint!

**********
Bei allen, wo die oben beschriebene Lösung nicht funktioniert hat, hier ein super Workaround:

Einfach das Menü aufteilen und nicht mehr das ganze Menü anzeigen.
Mit dem Replacement-Tag {NAV_TABLE_COLUMN:X}

zum Beispiel:
+Home
..+Hauptmenü <-- nur die Einträge ab diesem Punkt zeigen
......+Eintrag1
......+Eintrag2
......+etc
..+Suche <- wird nie im Menü angezeigt
..+Sitemap <- wird nie im Menü angezeigt

Danke auch an cwenet für den Tip!
Post Reply