Page 5 of 10
Posted: Thu 27. Sep 2007, 00:28
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
Posted: Thu 27. Sep 2007, 00:48
by pepe
Thanks Knut... i will give it a try... and tell what happened
Posted: Thu 27. Sep 2007, 02:03
by pepe
The 1. way was
NO solution...
So i took OGs code-snippet as my basic... and it works fine
<?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
Posted: Thu 27. Sep 2007, 11:23
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!!
- I guess
tester
Posted: Thu 4. Oct 2007, 00:40
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
oh yeah, that´s good to hear ^^ THX
Posted: Wed 10. Oct 2007, 21:32
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.
Posted: Thu 11. Oct 2007, 14:29
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
KH_NAVI_horizontal/vertical
Posted: Thu 11. Oct 2007, 16:10
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
Re: KH_NAVI_horizontal/vertical
Posted: Thu 11. Oct 2007, 16:58
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...!
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
Posted: Thu 11. Oct 2007, 17:21
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
Posted: Thu 11. Oct 2007, 17:37
by oeconom
Great thank you!
Now it's clear.
Best wishes,
Felix
Posted: Thu 11. Oct 2007, 19:48
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...
Posted: Thu 11. Oct 2007, 20:38
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
Posted: Fri 12. Oct 2007, 09:33
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?
Posted: Tue 16. Oct 2007, 14:18
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