[HOWTO]add a footer navigation like NAV_LIST_TOP
Posted: Wed 10. Mar 2004, 16:50
Hi together, this forum is great! Many helpful hints and answers!
I hope I can help somebody,too by sharing my newbie-solutions with you!
Thats No.1, small tutorial :
How to add a footer navigation with a structure sublevel like {NAV_LIST_TOP}
Use: Want to create a horizontal navigation above the main block and one with the same
Outlook, but with a structure sublevel in the footer?
Problem: {NAV_LIST_TOP} and {NAV_LIST_TOP:homename:class} don’t allow to cat/target a substructure ID, so if you use them both in header bar and footer bar, you get the same.
Example:
But we want:
The footer navigation only displays the subcategory, in my example the countries shown in the
left nav table, too. But it could be any level depth!
How-to:
We will use the more flexible {NAV_LIST_CURRENT:show-index:index-name:list_class} for our needs in the footer navigation. This replacement tag doesn’t allow to target a specific ID either, but it lets me define the class that formats the navigation table. I want to have the same formatting like in the header navigation, so I use the css class list_top, default in tag {NAV_LIST_TOP}.
1. So add this replacement tag in your footer:
{NAV_LIST_CURRENT:0::list_top} //tells NAV_LIST_CURRENT to look like NAV_LIST_TOP
2. Open phpwcms_root\include\inc_front\front.func.inc.php
3. Go to line 1095: function css_list_top
4. Change:
function css_list_top($struct, $struct_path, $homelink="Home", $class="list_top", $link_to="index.php")
to:
function css_list_top($struct, $struct_path, $homelink="Home", $class="list_top", $link_to="index.php?id=20")
where ?id=20 is the category (“cat”) of the structure level that you want to show in the footer menu.
5. You can get the id by checking your page structure in PHPWCMS admin section by hovering the mouse pointer over the structure item “edit” minibutton. See it in your browser status line,
e.g. cat=20.
Now, you can create a substructure, for example:
“footer navigation”, status :hidden
sublevel “contact”,
“about us”
“impressum” and so on will be shown,
and you have the same handling like in the top navi bar, but with the categories you wish.
Hope this tutorial from a newbie helps others, too
Cheers, tommi
I hope I can help somebody,too by sharing my newbie-solutions with you!
Thats No.1, small tutorial :
How to add a footer navigation with a structure sublevel like {NAV_LIST_TOP}
Use: Want to create a horizontal navigation above the main block and one with the same
Outlook, but with a structure sublevel in the footer?
Problem: {NAV_LIST_TOP} and {NAV_LIST_TOP:homename:class} don’t allow to cat/target a substructure ID, so if you use them both in header bar and footer bar, you get the same.
Example:
But we want:
The footer navigation only displays the subcategory, in my example the countries shown in the
left nav table, too. But it could be any level depth!
How-to:
We will use the more flexible {NAV_LIST_CURRENT:show-index:index-name:list_class} for our needs in the footer navigation. This replacement tag doesn’t allow to target a specific ID either, but it lets me define the class that formats the navigation table. I want to have the same formatting like in the header navigation, so I use the css class list_top, default in tag {NAV_LIST_TOP}.
1. So add this replacement tag in your footer:
{NAV_LIST_CURRENT:0::list_top} //tells NAV_LIST_CURRENT to look like NAV_LIST_TOP
2. Open phpwcms_root\include\inc_front\front.func.inc.php
3. Go to line 1095: function css_list_top
4. Change:
function css_list_top($struct, $struct_path, $homelink="Home", $class="list_top", $link_to="index.php")
to:
function css_list_top($struct, $struct_path, $homelink="Home", $class="list_top", $link_to="index.php?id=20")
where ?id=20 is the category (“cat”) of the structure level that you want to show in the footer menu.
5. You can get the id by checking your page structure in PHPWCMS admin section by hovering the mouse pointer over the structure item “edit” minibutton. See it in your browser status line,
e.g. cat=20.
Now, you can create a substructure, for example:
“footer navigation”, status :hidden
sublevel “contact”,
“about us”
“impressum” and so on will be shown,
and you have the same handling like in the top navi bar, but with the categories you wish.
Hope this tutorial from a newbie helps others, too
Cheers, tommi