[SOLVED] nav_table_column question

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
burna
Posts: 13
Joined: Tue 3. Jan 2006, 18:26
Location: NÖ/Austria

[SOLVED] nav_table_column question

Post by burna »

hy everyone!

after reading lots of posts and trying different codes i need a little kick in the right direction.

my site is containing two languages, german and english.

there is a top navigation based on {NAV_ROW:2:0}, so all levels under german are displayed. works fine!

my problem is the subnavigation based on {NAV_TABLE_COLUMN:2}
every menu-item has sub-categories. if you click on products, the subnavigation should only show all menupoints of products.
example: http://www.gnuelps.de/index.php?phpwcms

i know there is the possibility to use {NAV_LIST_CURRENT} which isnt't the soloution for me at this project.

so i tried the code from Rainer G: --...--/index.php/topic,100.0.html

Code: Select all

 [PHP] $id = $GLOBALS['content']['cat_id'];
 $parent_id=$GLOBALS['content']['struct'][$id]['acat_struct'];
 While ($parent_id<>0){
   $id=$parent_id;
   $parent_id=$GLOBALS['content']['struct'][$id]['acat_struct'];
 }

 if ($id > 0) {
  echo '{NAV_TABLE_COLUMN:'.$id.'}';
 }
[/PHP]
but the code doesent work for me, it shows me the complete menustructure again.

does anybody has a hint for me? would be really appreciated. love this cms!

greets, bernard
Last edited by burna on Fri 13. Jan 2006, 08:20, edited 1 time in total.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi burna,

you can use an other RT (levelbased): {NAV_TABLE_SETLEVEL:x:y}
Take a look: http://www.phpwcms.de/forum/viewtopic.php?p=56029#56029

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
burna
Posts: 13
Joined: Tue 3. Jan 2006, 18:26
Location: NÖ/Austria

Post by burna »

hy fli-flop!

thanks for your quick reply.

i've already seen the script from usta. nice work by the way.
but doesn't this require lot's of templates?

at this time i have 2 templates (de/en) with the same levels
the levels:

Code: Select all

Home                ID: 0 (redirection to deutsch)
-Deutsch            ID: 2 ALIAS: deutsch 		
--Produkte          ID: 3 		
---Produkt 1        ID: 6
---Produkt 2        ID: 8
---Produkt 3        ID: 10
--Kundenservice     ID: 4 		
--News & Presse     ID: 5 		
--Suchen            ID: 9 ALIAS: search 		
-Englisch		     ID: 7 ALIAS: english 
so if i want the submenus of Produkte i write?
{NAV_TABLE_SETLEVEL :0 :1}

is this correct?
in your sample (http://www.phpwcms.de/forum/viewtopic.php?p=56029#56029) ebene 0 is casa, for me means ebene 0 is Produkte, correct?

does this hack replace a original function?

thanks in advance, bernard
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi,
it doesn´t replace it´s an enhancement, a new function.
If you want, you can use both function at one site.

That tag works level-based instead of ID-based. You don´t longer used the PHP-code at the template.

Your idee is right.

Install that RT and work with it.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply