vertical menus and 'this' context
|
Aug 18, 2008 15:24
21 posts
|
Hello, I'm trying to dispaly vertical menus splitted in two parts (left and right sidebar) So the foreach() in the header standard snippet won't work and I need a function called menu_entry to display properly (and by hand) then entries (subpages) I get something like this
-- echo menu_entry('subpage1_slug'); -- echo menu_entry('subpage2_slug');
-- echo menu_entry('subpage3_slug'); -- echo menu_entry('subpage4_slug'); and subpages inherit main page layout. But I noticed a problem : $this ! in the context of the sidebar, it refers the main page, but not subpages ! so I can't use it to find subpages, slug, title, url and determine which page is currently browed... if I put the function in a snippet, it's worst : I get a fatal error because of this context is lost (since I try making a 'closure' writing $thisPage = $this before function call...) How could I proceed ? I think the answer is in 'CSS play' demo but I'm not sure |
|
Aug 18, 2008 18:38
21 posts
|
doing a detour, it works ! code comes sooner |
|
Aug 19, 2008 04:19
820 posts
|
Glad you have a solution! I'm still not 100% clear on what it is you are trying to do!! O_o |
|
Aug 19, 2008 15:12
21 posts
|
the snippet is in my temp dir www.eozine.fr/temp |
|
Aug 19, 2008 15:14
21 posts
|
sorry David no visible example for the moment. Site will be changed sooner
|