Page 1 of 1

[HOWTO]add a footer navigation like NAV_LIST_TOP

Posted: Wed 10. Mar 2004, 16:50
by tommi
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!
:idea: Thats No.1, small tutorial :idea: :
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:
Image
But we want:
Image
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 :D
Cheers, tommi

not very flexible...

Posted: Wed 10. Mar 2004, 17:49
by tommi
hmm, can somebody tell us how this could be done "properly", lets say by implementing an alternate fuction?
Ciao, Tommi

Posted: Wed 10. Mar 2004, 18:57
by frold
your images are placed localhost - so we can´t see them!!

Posted: Wed 10. Mar 2004, 21:36
by cmslover
Hi Tommi,

Could you upload the images again? They don't show up :?
I want to try your tutorial out but I don't understand the concept yet. :oops:

Shame on me :o)

Posted: Thu 11. Mar 2004, 14:08
by tommi
:oops: how xcan I upload the images :oops:
HTought it would be uploaded from localhost.
I ccan't place it in a public place here.
Heeelp :wink:

Posted: Thu 11. Mar 2004, 14:15
by tyr
Tommi -- I just uploaded my images to my web site and linked to them from there. There may be another way, but linking to my website was quicker for me.

Posted: Thu 11. Mar 2004, 17:24
by bobd314
if any one want's something to hold some images go to http://wh0cares.com/script then the upload thingy, and it's a php file in there or it might be http://wh0cares.com/Scripts/Upload-Script... hold on ill go look..
ook
http://www.wh0cares.com/scripts/Upload- ... dmulti.php there ya go



http://www.wh0cares.com/scripts/Upload- ... dmulti.php

Thanx Bobd!

Posted: Fri 12. Mar 2004, 10:37
by tommi
Now everybody should see the pics, hope we all get input from this topic, since I know its not totally developped!
Cheers, tommi

Posted: Mon 10. May 2004, 20:02
by vio
I have other solution.You can use this funtion
function css_list_top($struct, $struct_path,$struct_id, $homelink="Home", $class="list_top", $link_to="index.php") {
.....
$top_struct = return_struct_level($struct, $struc_id)

}