WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Menues don't show up
(1/1)
spida:
Hello everybody,
I am experiencing a problem with menues on a site. The site runs on my localhost flawlessly, yet exactly the same one doesn't work on the external webserver. Both with WB 2.7.
I am completely at the end of my wits, so please help, if you can.
The code includes show_menu2 four times. Here they are:
Main menu, shows on both installations:
--- Code: ---<?php show_menu2(0,0,1,true,'<li><a href="[url]" title="[menu_title]"> <span>[menu_title]</span></a></li>','','','','',''); ?>
--- End code ---
Submenu which shows only in local installation:
--- Code: ---<?php show_menu2(0,38,1,true,'[li]<a href="[url]" title="[menu_title]">[menu_title]</a>'); ?>
--- End code ---
Breadcrumb shows in both installs again:
--- Code: ---<?php show_menu2(0, SM2_ROOT, SM2_MAX+1, SM2_CRUMB, '<span class="[class]"> > <a href="[url]" title="[menu_title]">[menu_title]</a>', '</span>', '', '', 'Sie sind hier: <span class="[class]"><a href="[url]" title="[menu_title]">[menu_title]</a>'); ?>
--- End code ---
And finally a little additional menu for the footer which only shows on the local one:
--- Code: ---<?php show_menu2(0,39,1,true,'| <a href="[url]" title="[menu_title">[menu_title]</a>','','','','',''); ?>
--- End code ---
As you can see, I use page_id for th second and the fourth, the page ids are checked as correct several times. Entries of both menues are subsumised under hidden pages, while the pages themselfes are not hidden. Should work in general, I did this a couple of times with other websites successfully.
I tried each menu with an individual number (0 to 3) and activating "several menus" in the website settings (admin), but that didn't work either.
I don't get rid of the feeling that the problem might have to do with the page ids, despite using the exact numbers as shown in the admin. But maybe I have overseen something else vital and someone here on the forum can give me a hint.
Cheers,
spida
[gelöscht durch Administrator]
BerndJM:
Hi,
I assume that the 1 you use for $aMaxLevel isn't a valid value ...
Regards Bernd
spida:
@Bernd: Your suggest sounded like a good one on first sight, but changing the value to 2 or 3 changes nothing on the remote webserver, and let the menues disappear on the local webserver. It doesn't make sense anyway when I think about it, since the structure of the "submenues" ("Produkte", "Service") includes just one level (see screenshot I added to my earlier post). Thanks for your guess, though.
When page_id is set to 0, the complete list of pages is shown in the menue, just with page_id set to the 38 or 39 respectively doesn't work.
Any other ideas what it might be? Should I perhaps switch to show_menu and use "multiple menues" in the admin?
EDIT:
I should make on thing clearer: The code of the two navigations in questions is just not rendered (empty space where the menues are supposed to be) on the remote webserver, where it is rendered perfectly on the local machine.
Cheers,
spida
BerndJM:
Hi,
should better heve said "a numeric value isn't valid"!
--- Quote ---$aMaxLevel
Maximum menu level to display. Menus are displayed from the start
level down to this level.
SM2_ALL No limit, all levels are displayed
SM2_CURR+N Always show to the current page + N levels.
SM2_CURR Current (no children)
SM2_CURR+3 All parents + current + 3 children
SM2_START+N Always show from the starting level + N levels. The
levels of menu will always be displayed regardless of
what level the current page is.
SM2_START Single level of menus from starting level
SM2_START+1 Starting level and 1 level down
SM2_MAX+N Show at most N levels from the starting level. Levels
won't be shown if they are below the current level.
SM2_MAX Starting level only (same as SM2_START)
SM2_MAX+1 Maximum of starting level and 1 level.
--- End quote ---
Regards Bernd
spida:
Yep, you'r right Bernd!
This works now:
--- Code: ---<?php show_menu2(0,38,SM2_ALL,SM2_ALL,'[li]<a href="[url]" title="[menu_title]">[menu_title]</a>'); ?>
--- End code ---
Cheers and thanks again for the help,
spida
PS: Only funny thing is that the numeric value works on my local server. Well, doesn't matter so much.
Navigation
[0] Message Index
Go to full version