NAVIGATION
This is an old revision of the document!
translate
Acceptance: The first navigation level is to be represented horizontal, for example in the head area of the side. The deeper levels are to be represented vertically, for example on the left side of the homepage.
Horizontal with the active level category_02
| home | category_01 | [category_02] | category_03 | category_04 |
Vertical output of the sub level from the active parent category [category_02]
Docu: –
Forum: NAV_LIST_UL in verschiedenen Ebenen (using the hepl of the Level-Lift)
Autor: K.Heermann (flip-flop) http://planmatrix.de 2009/05/13
CMS-Version: >= V1.3.0
Version: –
Update: –
Condition: → /config/phpwcms/conf.inc.php] \\
* $phpwcms['allow_cntPHP_rt'] = 1;
----
----
\\
Um das Problem zu lösen werden zwei Navigationen aufgerufen, die eine für den horizontalen, die andere für den vertikalen Bereich.
Wichtig dazu ist hier ein Parameter der horiz. Navigation. \\
Hier wird die Ausgabe nur einer Ebene erlaubt //({NAV_LIST_UL:F,0,**1**,act_path,active})//.
Um die Parameter nachzulesen bitte [[deutsch/navigationen/nav_list_ul_parameter|NAV_LIST_UL (Parameter).
Eine komplettes CSS-Set: NAV_LIST_UL (CSS)
To solve the problem we need two navigations, one for the horizontal, the other one for the vertical range. Important is a parameter of the horiz. navigation.
The output is restriction to only one level ({NAV_LIST_UL:F,0,1,act_path,active}).
------------------------------------ L E V E L .: : : : .0 1 2 3 <- LEVEL-Nr. .: : : : -+ home : ID=0 -+--+ category_01 ID=01 -+--+--+ category_01_01 ID=10 -+--+--+ category_01_02 ID=11 -+--+ category_02 ID=02 -+--+--+ category_02_01 ID=04 -+--+--+--+ category_02_01_01 ID=06 -+--+--+--+ category_02_01_02 ID=07 -+--+--+ category_02_02 ID=05 -+--+--+ category_02_03 ID=08 -+--+ category_03 ID=03 -+--+ category_04 ID=09 .: : : : .0 1 2 3 <- LEVEL Nr. ------------------------------------
<div class=“nlu_navi1”>
{NAV_LIST_UL:F,0,1,act_path,active}
</div> → only the first level (deepth=1) behind “Home (ID=0)”
Exposition: | home | category_01 | [category_02] | category_03 | category_04 |
And structurally:
------------------------------------ L E V E L .: : : : .0 1 2 3 <- LEVEL-Nr. .: : : : -+--+ category_01 ID=01 -+--+ category_02 ID=02 (wenn aktiv, siehe unten) -+--+ category_03 ID=03 -+--+ category_04 ID=09 .: : : : .0 1 2 3 <- LEVEL Nr. ------------------------------------
Now still the expenditure of the sub level is missing, in addition the level-lift is used. (Representation of navigation starting from a certain level).
In the layout this php-snippet is placed at that point, where this navigation component is to appear. (In our case it is the output starting from the first level - > LEVEL_ID'][ 1 ]).
[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 which can be indicated. (Output starting from this level …).
This second navigation call ({NAV_LIST_UL:….}) thus embedded into a small controll script which queries the levels.
<note important> conf.inc.php → $phpwcms['allow_cntPHP_rt'] = 1; allow PHP replacement tags and includes in content parts </note>
Z.B. category_02 = aktiv
------------------------------------ L E V E L .: : : : .0 1 2 3 <- LEVEL-Nr. .: : : : -+--+--+ category_02_01 ID=04 -+--+--+ category_02_02 ID=05 -+--+--+ category_02_03 ID=08 .: : : : .0 1 2 3 <- LEVEL Nr. ------------------------------------
Z.B. bei category_02 = aktiv und category_02_01 = aktiv:
------------------------------------ L E V E L .: : : : .0 1 2 3 <- LEVEL-Nr. .: : : : -+--+--+ category_02_01 ID=04 (aktiv) -+--+--+--+ category_02_01_01 ID=06 -+--+--+--+ category_02_01_02 ID=07 -+--+--+ category_02_02 ID=05 -+--+--+ category_02_03 ID=08 .: : : : .0 1 2 3 <- LEVEL Nr. ------------------------------------
<div class=“nlu_navi1”> {NAV_LIST_UL:F,0,1,act_path,active} </div>
und
[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]
ergibt (bei aktiver Ebene category_02)
| home | category_01 | [category_02] | category_03 | category_04 |
oder (bei aktiven Ebenen category_02 und category_02_01)
| home | category_01 | [category_02] | category_03 | category_04 |