Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 02:13:19 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155476 Posts in 21708 Topics by 7734 Members
Latest Member: rofroodoOvego
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Levels in menu  (Read 4986 times)
Hans

Offline Offline

Posts: 564


« on: December 12, 2004, 09:59:19 AM »

It would be nice to have an introduction on how to be able to make /alter menu's so that they can handle more than 2 levels. I know that there is an example in the "Jump" template but for layerman like me this won't help  Smiley
Could anybody help?
Hans
Logged

Hans - Nijmegen - The Netherlands
Ryan

Offline Offline

Posts: 2048



WWW
« Reply #1 on: December 12, 2004, 10:02:58 AM »

I will be documenting how to make templates ASAP, but it might not happen until early next year sometime. Cool
Logged

Website Baker Project Founder
www.websitebaker.or g

To contact me via email, visit:
www.ryandjurovich.c om
Hans

Offline Offline

Posts: 564


« Reply #2 on: December 20, 2004, 02:45:56 PM »

Maybe there is someone else who could tell me what to change in the Round and / or Simpcombine template to make it handle more than 2 levels (pref. 4)?

I combined parts of different template-index-files but wasn't able to get a working template  Sad
Logged

Hans - Nijmegen - The Netherlands
Stefan
Guest
« Reply #3 on: December 20, 2004, 09:36:52 PM »

Actually it's quite easy to do:

To get multi-level support for "round" you must just take from the AllCSS template file index.php the function sub_menu, copy it to the beginning of round/index.php and change "padding-left" to "text-indent" (otherwise you get an ugly indentation effect of the box).
Then delete lines 60-89 (of the original file, not after the modification above!)
which is everything between the <?php...?> tags where it says "Loop through main pages"
Take the corresponding part from allcss (it says "loop through menu items") - again everything between the php tags - it's lines 79-89.
And you're set. All this works for simplecomb also but you have to play around with the layout because your text is centered.

I have put the "improved round" template on my website for downloading.
Logged
Hans

Offline Offline

Posts: 564


« Reply #4 on: December 20, 2004, 10:10:49 PM »

This is really great Stefan. Gonna try it immediately smiley
Thank you!
Logged

Hans - Nijmegen - The Netherlands
Hans

Offline Offline

Posts: 564


« Reply #5 on: December 20, 2004, 10:24:23 PM »

I installed the template and it works great. The only problem is that the menu doesn't collapse (as it does in Round) and that is a problem because I have a lot of 2nd and 3rd level pages. Don't know if changing that is as easy (for me it's witchcraft Cheesy ) as extending levels...  huh
Logged

Hans - Nijmegen - The Netherlands
Stefan
Guest
« Reply #6 on: December 20, 2004, 11:34:33 PM »

I'm afraid this is not as simple. The problem is that the pages do not know who their top-level ancestor (the grandparent if you wish) is.
I have found a workaround but it involves quite a bit of tedious work with the database entries of the pages. I will post this issue as a feature request - we'll see what Ryan says....
Logged
Hans

Offline Offline

Posts: 564


« Reply #7 on: December 21, 2004, 12:36:28 AM »

I hope that Ryan or somebody else will find a solution.... a site of a little bit importance cannot without at least a 3th menulevel I suppose.
Logged

Hans - Nijmegen - The Netherlands
Ryan

Offline Offline

Posts: 2048



WWW
« Reply #8 on: December 21, 2004, 12:57:41 AM »

Hi guys, it seems you really really want unlimited page levels for the Round template? Well, maybe you will get a little Christmas pressy in 2.2.3 wink
Logged

Website Baker Project Founder
www.websitebaker.or g

To contact me via email, visit:
www.ryandjurovich.c om
Hans

Offline Offline

Posts: 564


« Reply #9 on: December 21, 2004, 08:26:15 AM »

Hi Ryan, I saw that you have released 2.2.3 already! You're just great  Cheesy
One question: does round template need to be altered or is a new version needed?
Happy Christmas!
Logged

Hans - Nijmegen - The Netherlands
Ryan

Offline Offline

Posts: 2048



WWW
« Reply #10 on: December 21, 2004, 08:40:27 AM »

Quote
One question: does round template need to be altered or is a new version needed?
- If you update the old Round templates files with the one's in 2.2.3 everything should work fine. Cool
Logged

Website Baker Project Founder
www.websitebaker.or g

To contact me via email, visit:
www.ryandjurovich.c om
Hans

Offline Offline

Posts: 564


« Reply #11 on: December 21, 2004, 08:50:52 AM »

Groups permissions upgraded

Fatal error: Call to undefined function: root_parent() in /www/h/hansvm/htdocs/wb3/upgrade.php on line 37

Placed upgrade.php in wb root and ran it. What have I done wrong?
Logged

Hans - Nijmegen - The Netherlands
Ryan

Offline Offline

Posts: 2048



WWW
« Reply #12 on: December 21, 2004, 08:54:37 AM »

Oh, did I forget to mention you need to upgrade the files as well (before you run the script)? Sorry, i will fix the release notes now. Cool
Logged

Website Baker Project Founder
www.websitebaker.or g

To contact me via email, visit:
www.ryandjurovich.c om
Anonymous
Guest
« Reply #13 on: December 28, 2004, 12:48:47 AM »

I have got the new files and got the tier to work at root level and first child level, but it always expands and shows me 3 and 4 tier. Has anyone solved this, it seems like you guys are on the right step.

Here is my test
http://www.hudge.com/wb/pages/products.php

I would like to hide Technical Data and Dimensional data (tier 3) until tier 2 is selected.

As in http://www.hudge.com/wb/pages/floor_mounts/system_2000.php

Thanks and let me know if you need any CSS/Graphic Design/Hosting help.

Jim
Logged
brown
Guest
« Reply #14 on: December 29, 2004, 07:55:10 AM »

what i'm kinda concerned about is that when i do get the multiple levels (thanks!) some of the pages that are marked private or 'none' show up, i think the line in the template file to check permissions doesn't work: if (!isset($admin) OR.....) my php is weak but this looks like the line but i can't really propose a fix, but the class.admin.php has a function which i think is supposed to do this same thing (i think its called show_page($page)
Logged
Hans

Offline Offline

Posts: 564


« Reply #15 on: December 29, 2004, 08:51:25 AM »

@ guest:
As you can see in this discussion: https://www.websitebaker.org/forum/viewtopic.php?t=205 Ryan says it is meant to be so. I too would have the 3 and so levels to collaps huh
But in the same discussion there is a little workaround. You can add pages you normally would place in the third level to a second level page. That way the menu becomes not so long. Maybe that helps.
Hans
Logged

Hans - Nijmegen - The Netherlands
Steven Holder
The Template Master

Offline Offline

Posts: 493



WWW
« Reply #16 on: December 29, 2004, 05:14:25 PM »

What ive heard that most people want is it to have their menu like this.

1. Home
2. Products
3. Contacts

when they click products they want it like this

1. Home
2. Products
2.1 Display Products
2.2 Misc Products
3. Contacts

when they click Display Products they want it like this

1. Home
2. Products
2.1 Display Products
2.1.1 Monitors
2.1.2 LCD Screens
2.2 Misc Products
3. Contacts

Ive been working on it, but i cant make the 3rd level colapse.
Logged
fienieg
Guest
« Reply #17 on: December 31, 2004, 02:20:19 AM »

maybe the above is a good idea, an option, to put numbers infront of the page title (in the menu)

Great for FAQ, HELP guides and tutorials!!!!

and maybe some XML tricks can be imbeded in the php source, so the structure will be

parent
  childnote
     childnote 1 (and the 1 is reffering to the first childnote)

I'll try to look into it!
But for now, i'm fixing some annoing bugs in my templates... huh
And solving some style issues... rolleyes

i'll post some small and simple templates later on...  Smiley  cheesy
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!