NAV_LIST_UL >= V1.30

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi pepe,

please do it in this way, I hope it will run.
[PHP]
if(isset($GLOBALS['LEVEL_ID'][2])) {
$level_id = $GLOBALS['LEVEL_ID'][1];
echo '<div id="nlu_navi1">';
echo '{NAV_LIST_UL:F,'.$level_id.',,active_path,active_element,,}';
echo '</div>';
}
[/PHP]
A very good solution you will find at this place: http://www.phpwcms.de/forum/viewtopic.php?p=90950#90950

Regards Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Thanks Knut... i will give it a try... and tell what happened :wink:
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

The 1. way was NO solution... :cry:

So i took OGs code-snippet as my basic... and it works fine :lol:

<?php

/*
==================================================================
Datei: "nav_column_ul.php" im Ordner ".../inc_script/frontend_render"
Durch diese Script wird {NAV_COLUMN_UL} im Template durch die folgende Sequenz ersetzt:

<div id="nav_column_ul">
{NAV_LIST_UL:F,'.$level_id.',,active_path,active_element,,}
</div><!-- //nav_column_ul -->

Das enstpricht dem "ueblichen" LevelLift:

[PHP]
if(isset($GLOBALS['LEVEL_ID'][1])) {
$level_id = $GLOBALS['LEVEL_ID'][1];
echo '<div id="nav_column_ul">';
echo '{NAV_LIST_UL:F,'.$level_id.',,active_path,active_element,,}';
echo '</div><!-- //nav_column_ul -->';
}
[/PHP]

Mit dem Vorteil: Keine leeren DIVs, wenn keine SubMenues vorhanden sind!
===================================================================
*/


$_verticalmenu = '';

if(isset($LEVEL_ID[1])) {
$_verticalmenu = trim( buildCascadingMenu( 'F,' . $LEVEL_ID[1] . ',,active_path,active_element,,' ) );
if( $_verticalmenu ) {
$_verticalmenu = '<div id="nav_column_ul">' .LF. $_verticalmenu .LF. '</div><!-- //nav_column_ul -->';
} else {
$_verticalmenu = '';
}
}

// Ueberschreiben des Replacement Tags innerhalb des Templates
$content['all'] = str_replace( '{NAV_COLUMN_UL}', $_verticalmenu, $content['all'] );

?>
A very BIG THANKS to Oliver and Knut :P
tester
Posts: 76
Joined: Mon 3. Jul 2006, 20:36
Location: Århus, Denmark

Post by tester »

Hi!

I thought I made it but then I ran into Internet Explorer 6.0.

Please forget this post.

Spent my day fighting Internet Explorer 6.0 and I won!! :D - I guess

tester
Crypted
Posts: 48
Joined: Wed 26. Sep 2007, 16:54

Post by Crypted »

pepe wrote:WHY that???

You are able, to make a HTML-layout-construction and put DIVs inside the tables...

A combination of "both worlds" is possible :idea:
oh yeah, that´s good to hear ^^ THX
Niedzielan
Posts: 53
Joined: Wed 27. Dec 2006, 13:06

Post by Niedzielan »

Hi There,

Is there an easy way to put an image under every main menu item, like:

ITEM1
- image -
ITEM2
- image -
ITEM3
- image -
SUBITEM 1
SUBITEM 2
ITEM4
- image -

I can't find it anywhere and I don't know where to put te code.
User avatar
oeconom
Posts: 337
Joined: Fri 13. May 2005, 09:33
Location: Stuttgart
Contact:

Post by oeconom »

Hi folks,
it might have been asked already, but I can't finid it...
How can I
1. crade a two row/level horzontal navigation like this:
Level1 --topic1--topic2--topic3--...
Level2 --sub1--sub2--sub3--...

Level 2 shows the subtopics in dependency of Level1 chosen topic.
(is it just twice the horizontal one from the beginning only with an altered starting ID???)

2. if there are suptopics to level two, I'd like to have an vertical navi showing only the level3 topics in dependency of level 2 chosen topic.


Thanks for your help,
Felix
...alles wird gut!
still alive...
Experimenting with phpwcms and hoping to have time one day to get a site live... :wink:
One Site finished! :P
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

KH_NAVI_horizontal/vertical

Post by flip-flop »

Hi,

Level lift for the vertical navigation, beginning at the first level behind [Ebene02]:

Code: Select all

[PHP]
if(isset($GLOBALS['LEVEL_ID'][1])) {
$level_id = $GLOBALS['LEVEL_ID'][1];
echo '<div class="nlu_navi1">'.LF;
echo '{NAV_LIST_UL:F,'.$level_id.',,act_path,active}';
echo '</div>';
}
[/PHP]
Where LEVEL_ID'][X] is the level.

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

Level1 --topic1--topic2--topic3--...

Code: Select all

<div class="nlu_horiz1"> {NAV_LIST_UL:F,0,1,act_path,active} </div>
Level2 --sub1--sub2--sub3--...

Code: Select all

[PHP]
if(isset($GLOBALS['LEVEL_ID'][1])) {
$level_id = $GLOBALS['LEVEL_ID'][1];
echo '<div class="nlu_horiz2">'.LF;
echo '{NAV_LIST_UL:F,'.$level_id.',1,act_path,active}';
echo '</div>';
}
[/PHP]
level3 topics

Code: Select all

[PHP]
if(isset($GLOBALS['LEVEL_ID'][2])) {
$level_id = $GLOBALS['LEVEL_ID'][2];
echo '<div class="nlu_navi1">'.LF;
echo '{NAV_LIST_UL:F,'.$level_id.',,act_path,active}';
echo '</div>';
}
[/PHP]
- NAV_LIST_UL

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
oeconom
Posts: 337
Joined: Fri 13. May 2005, 09:33
Location: Stuttgart
Contact:

Re: KH_NAVI_horizontal/vertical

Post by oeconom »

flip-flop wrote: Level lift for the vertical navigation, beginning at the first level behind [Ebene02]:

Code: Select all

[PHP]
if(isset($GLOBALS['LEVEL_ID'][1])) {
$level_id = $GLOBALS['LEVEL_ID'][1];
echo '<div class="nlu_navi1">'.LF;
echo '{NAV_LIST_UL:F,'.$level_id.',,act_path,active}';
echo '</div>';
}
[/PHP]
Where LEVEL_ID'][X] is the level.
Hi Knut,
like always you myde my day...! :wink:
Two points are unclear for me... (might be dump):
1. where to put the code I quoted upside and what it really does
2. for the "Ebene02" I need to create a seperate "nlu_navi1"?! And "Ebene03" utilizes the "nlu_navi1" again??

Thanks agan,
Felix
...alles wird gut!
still alive...
Experimenting with phpwcms and hoping to have time one day to get a site live... :wink:
One Site finished! :P
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

1. where to put the code I quoted upside and what it really does
Put the code into your template at the place where the navi should be.
It presented the right ID for the level[X] behind the first level in that specified tree.
2. for the "Ebene02" I need to create a seperate "nlu_navi1"?!
Mhh, I don´t understand.
And "Ebene03" utilizes the "nlu_navi1" again??
Your vertical navigation. Yes, why not.

Level 0 (--topic1--topic2--topic3--) horizontal -> class nlu_horiz1
Level 1 (--sub1--sub2--sub3--) horizontal -> class nlu_horiz1 or nlu_horiz2 if you want to have a other layout.
Level 2 (level3 topics) vertical -> class nlu_navi1 or better nlu_vert1
Last edited by flip-flop on Thu 11. Oct 2007, 18:44, edited 1 time in total.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
oeconom
Posts: 337
Joined: Fri 13. May 2005, 09:33
Location: Stuttgart
Contact:

Post by oeconom »

Great thank you!
Now it's clear.

Best wishes,
Felix
...alles wird gut!
still alive...
Experimenting with phpwcms and hoping to have time one day to get a site live... :wink:
One Site finished! :P
Niedzielan
Posts: 53
Joined: Wed 27. Dec 2006, 13:06

Post by Niedzielan »

Niedzielan wrote:Hi There,

Is there an easy way to put an image under every main menu item, like:

ITEM1
- image -
ITEM2
- image -
ITEM3
- image -
SUBITEM 1
SUBITEM 2
ITEM4
- image -

I can't find it anywhere and I don't know where to put te code.
@Knut

Hi Knut, don't you have a solution for my problem? I can't add the image into the css, can I? So I need the put it in the template, but how do I get an image under EVERY menu item?? I don't understand...
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

First idea, use a background image via css for the first level.
If you have more then one picture (for every category one) please use IDs for the navigation.

{NAV_LIST_UL:F,ID,,act_path,active,navID}

{NAV_LIST_UL:menu_type, start_id, max_level, class_path, class_active, ul_id_name, wrap_ul_div(0 = off, 1 = <div>, 2 = <div id="">), wrap_link_text(<em>|</em>)}

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Niedzielan
Posts: 53
Joined: Wed 27. Dec 2006, 13:06

Post by Niedzielan »

flip-flop wrote:First idea, use a background image via css for the first level.
If you have more then one picture (for every category one) please use IDs for the navigation.

{NAV_LIST_UL:F,ID,,act_path,active,navID}

{NAV_LIST_UL:menu_type, start_id, max_level, class_path, class_active, ul_id_name, wrap_ul_div(0 = off, 1 = <div>, 2 = <div id="">), wrap_link_text(<em>|</em>)}

Knut
Indeed, I need a different picture for every category. But I don't exactly understand you're solution. You say I need to use this {NAV_LIST_UL:F,ID,,act_path,active,navID}.

Could you give me an example?
User avatar
oeconom
Posts: 337
Joined: Fri 13. May 2005, 09:33
Location: Stuttgart
Contact:

Post by oeconom »

Hi,

the width of each navi cell is defined within the css code.
Is there also a way to let the navigation be spread over the complete width, or alternatively, over a defined with (px) regardless od the number of nav elements?


Thanks,
Felix
...alles wird gut!
still alive...
Experimenting with phpwcms and hoping to have time one day to get a site live... :wink:
One Site finished! :P
Post Reply