Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 12, 2012, 02:59:45 AM
1 Hour
1 Day
1 Week
1 Month
Forever
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
.
149621
Posts in
21098
Topics by
7537
Members
Latest Member:
lotte2
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
Having problems with Navigation 1 code
Pages: [
1
]
Go Down
Author
Topic: Having problems with Navigation 1 code (Read 681 times)
rauni
Offline
Posts: 13
Having problems with Navigation 1 code
«
on:
February 28, 2010, 04:59:09 AM »
I've made my website baker template for the website I am doing, but for some reason the
Quote
<div id="navigation1">
<?php show_menu(2); ?>
</div>
code that the Designer Guide tells you to put, isn't working for my website's menu system. . I have all the right CSS, and I have packaged it correctly. But when I go to just type in the Naviagtion 2 code it works fine. Can some one tell me what I may be doing wrong, or what I need to provide in order to get some help on this problem that I can seem to figure out?
TIA
«
Last Edit: March 07, 2010, 12:13:15 AM by rauni
»
Logged
BerndJM
Offline
Posts: 1764
Re: Having problems with Navigation 1 code
«
Reply #1 on:
February 28, 2010, 05:53:14 AM »
Sorry,
but where the hell the designer guid tells you to put
Code:
<?php show_menu
(
2
);
?>
for a simple single menu call??
If you want to use the "old" show_menu function just try a simple:
show_menu() in this place - as you explained your behavior, there is no need to call an 2nd / 3rd menu as described in the tutorial for multiple menus ...
Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.
rauni
Offline
Posts: 13
Re: Having problems with Navigation 1 code
«
Reply #2 on:
February 28, 2010, 10:59:27 AM »
http://www.websitebaker2.org/en/help/designer-guide/adding-template-functions.php#anker6
This is where on the website baker site that it's telling me to put it in my template. Yet when I do that it doesn't work. I've tried just
Quote
<div id="navigation1"><?php show_menu(); ?> </div>
But thtas not working. Well in a way it works, it places the links vertically, where as I want them horizontally...
Logged
doc
Guest
Re: Having problems with Navigation 1 code
«
Reply #3 on:
February 28, 2010, 11:11:10 AM »
@rauni:
You should not only pick up a single code line but follow the ENTIRE template guideline instructions.
One chapter later it is mentioned that you need to add two $menu variables into your info.php file to get it working:
http://www.websitebaker2.org/en/help/designer-guide/creating-a-wb-template.php#anker2
Doc
Logged
rauni
Offline
Posts: 13
Re: Having problems with Navigation 1 code
«
Reply #4 on:
February 28, 2010, 11:28:48 AM »
Thanka Doc. But I'm sorry as I'm still in the dark. I get it a bit more and I realize I will need to change these lines in the info.php file but as I'm not sure what this means "// Definition der Menüelemente (wenn mehr als 1 Menü verwendet wird)". Could you help to Explain what I put after
Quote
$menu[1] =
this? Do I put the name of the div that hold the links?
TIA
Logged
doc
Guest
Re: Having problems with Navigation 1 code
«
Reply #5 on:
February 28, 2010, 11:42:58 AM »
Hi,
this is a German comment and means something like: definition of menu elements (if more than one menu is used). Same is true for blocks (lines below).
Check out the default values for show_menu(), than you see that the first parameter tells this function which menu to use (default: 1). If you specifiy a 2 but don´t add an additional menu via the info.php file, this will not work.
Also see this page (section Menu) for further details:
http://www.websitebaker2.org/en/help/user-guide/working-with-wb/pages-administration/change-settings.php
Doc
«
Last Edit: February 28, 2010, 11:46:44 AM by doc
»
Logged
rauni
Offline
Posts: 13
Re: Having problems with Navigation 1 code
«
Reply #6 on:
February 28, 2010, 11:48:42 AM »
Thanka Doc. But I'm sorry as I'm still in the dark. I realize that I have to put in a definition in there, and this is what I have done:
Quote
// Definition der Menüelemente (wenn mehr als 1 Menü verwendet wird)
$menu[1] = 'Top Navigation';
$menu[2] = 'Side Navigation';
I'm still not getting as to how that would do any difference, unless of course I'm doing it wrong and I would love for someone to correct me. I have been struggling with this for a few hours now and I wish I could figure out why this is acting the way it is!
Logged
doc
Guest
Re: Having problems with Navigation 1 code
«
Reply #7 on:
February 28, 2010, 11:53:08 AM »
Well,
a worked out example was available for download on the OLD help site. Think during the update of the new homepage this file gots lost.
In addition I do not think you really went through ALL steps.
http://www.websitebaker2.org/en/help/designer-guide/creating-a-wb-template.php
You need activate support for multiple menus via the WebsiteBaker backend (settings).
So for multiple menus one need:
- to add $menu variables to the info.php of the template
- make use of show_menu(x) in the index.php of the template
- activate that feature in the WB backend
- assign pages to one of the menus (1 default, 2 only visible via page settings)
Doc
«
Last Edit: February 28, 2010, 12:24:07 PM by doc
»
Logged
rauni
Offline
Posts: 13
Re: Having problems with Navigation 1 code
«
Reply #8 on:
February 28, 2010, 12:44:30 PM »
Wow. Your right. I've read further into it now. I see that I did miss many things, but none of them seem to be my problem...
Quote
So for multiple menus one need:
- to add $menu variables to the info.php of the template
- make use of show_menu(x) in the index.php of the template
- activate that feature in the WB backend
- assign pages to one of the menus (1 default, 2 only visible via page settings)
I believe I've done all this, read all about it, and double checked it all. I have the links there, but I'm trying to get them all on the same line. What am I missing to get this done?
I REALLY appreciate ALL the help Doc. I realize I've been a bit hasty in the event of trying to get this done and appreciate the time and patience you have put in to help me with this!
«
Last Edit: March 07, 2010, 12:13:45 AM by rauni
»
Logged
doc
Guest
Re: Having problems with Navigation 1 code
«
Reply #9 on:
February 28, 2010, 01:51:12 PM »
Hi,
think guessing makes not sense anymore.
So I suggest you create a zip file of your template and attach it to this thread. Pretty sure a solution can be found when knowing all the required details.
Doc
Logged
rauni
Offline
Posts: 13
Re: Having problems with Navigation 1 code
«
Reply #10 on:
February 28, 2010, 08:57:34 PM »
The Zip File
«
Last Edit: March 07, 2010, 12:14:07 AM by rauni
»
Logged
doc
Guest
Re: Having problems with Navigation 1 code
«
Reply #11 on:
February 28, 2010, 09:27:33 PM »
Hi,
honestly speaking I do not understand what you want to achieve right now. The template you attached works for me.
Do you want to create a template with more than one menu bar?
If not, just install the template attached to this post. Then go to your backend and activate it via WB backend -> Settings -> Simple Black.
If you stuck with the message like: "Currently in work" you simply need to create a dummy page via WB backend -> Pages. Once you added a dummy page, the "in work" message disappears and your template shows up in the frontend.
If this was your problem, you really should consider to read through the first steps guide:
http://www.websitebaker2.org/en/help/user-guide/first-steps.php
Doc
Logged
rauni
Offline
Posts: 13
Re: Having problems with Navigation 1 code
«
Reply #12 on:
February 28, 2010, 09:42:38 PM »
I'm just wanting to make the 1 navigation menu work for me.
The template I have does what I want but for some reason places the oncoming links in a Listed fashion downwards, where I want them across. Is it doing it for you? Cause when I have it up and all running it does this
Quote
Home
About
Services
instead of
Quote
Home | About | Services
this. ^---this is the way I want it to look.
I'm not sure why it's doing that, or whats happening....
Logged
doc
Guest
Re: Having problems with Navigation 1 code
«
Reply #13 on:
February 28, 2010, 10:34:35 PM »
Hi,
vertical menus can be realized with simple CSS. Please have a look on the linkes sites on the help project.
http://css.maxdesign.com.au/listamatic/horizontal01.htm
So in your case the following HTML/PHP code is required (copied from the example):
Code:
<div id="navigation1">
<?php show_menu
();
?>
</div>
And the following CSS code (screen.css) also copied over from the example (display: block, float: right).
Code:
#navigation1 ul li {
display: block;
}
#navigation1 ul li a {
color: #adf;
float: right;
font-size: 85%;
font-weight: 700;
text-decoration: none;
padding: 0 1em;
}
#navigation1 ul li a.aktiv,#navigation1 ul li a:hover,
#navigation1 ul li a:active {
color: #fff;
padding: 0 1em;
}
If you do not stick to the ids (#) your CSS menu will not be styled correct.
Doc
«
Last Edit: February 28, 2010, 10:36:09 PM by doc
»
Logged
rauni
Offline
Posts: 13
Re: Having problems with Navigation 1 code
«
Reply #14 on:
February 28, 2010, 11:57:10 PM »
Wow I've almost got it all. I believe I just have one more question. I'm trying to center it. But when I remove the "Float: right;" it obviously messes up. How do I make it so it can be centered?
Logged
rauni
Offline
Posts: 13
Re: Having problems with Navigation 1 code
«
Reply #15 on:
March 01, 2010, 02:25:55 AM »
Wow I've almost got it all. I believe I just have one more question. I'm trying to center it. But when I remove the "Float: right;" it obviously messes up. How do I make it so it can be centered?
I've also realized that the code does not work in IE 6 or 7. (Probably not 8 either then) All I did was move and change small things around.
MY HTML
Quote
<div id="linksBOX">
<div id="navigation1">
<?php show_menu(); ?>
</div>
</div>
MY CSS
Quote
#navcontainer ul li { display: inline; }
#navigation1 ul li a {
color: #ffffff;
float: right;
font-size: 19px;
font-weight: 200;
text-decoration: none;
padding: 0 0.7em;
}
#navigation1 ul li a.aktiv,#navigation1 ul li a:hover,
#navigation1 ul li a:active {
color: #fa9000;
padding: 0 0.7em;
}
A:link {color: #FFFFFF; text-decoration: none; text-decoration: underline}
A:visited {color: #FFFFFF; text-decoration: none}
A:active {text-decoration: underline}
A:hover {color: #fa9000;}
#linksBOX{
width: auto;
height: 30px;
padding-top: 10px;
text-align: center;
background-color: #000000;
border-color: #fa9000;
border-width: 1px;
border-style: solid;
border-left: 0px;
border-right: 0px;
}
Can anyone see why it wouldn't be centered and be messing up on IE? I've tried other methods, and looked at some help online but then I just mess the whole menu up again..
Logged
doc
Guest
Re: Having problems with Navigation 1 code
«
Reply #16 on:
March 01, 2010, 07:34:55 AM »
Details about CSS formating of menus can be found on the website I mentioned below:
http://css.maxdesign.com.au/listamatic/horizontal01.htm
Doc
Logged
rauni
Offline
Posts: 13
Re: Having problems with Navigation 1 code
«
Reply #17 on:
March 01, 2010, 08:51:52 AM »
Once again I appreciate all the help you have given me. I have figured it out with much reading and time. It all works! Thank you! Although, if I were to want to put a | between each of the links on my site how would I go about doing this?
Logged
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
-----------------------------
English
-----------------------------
=> Help & Support
-----------------------------
General
-----------------------------
=> WebsiteBaker Website Showcase
-----------------------------
English
-----------------------------
=> Modules
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
-----------------------------
General
-----------------------------
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
-----------------------------
General
-----------------------------
=> Security Announcements
-----------------------------
Deutsch (German)
-----------------------------
=> Hilfe/Support
-----------------------------
General
-----------------------------
=> Documentation
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
=> Module & Snippets
-----------------------------
English
-----------------------------
=> Archive (posts up to 2007)
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Deutsch (German)
-----------------------------
=> jQuery
=> Tutorials
=> Templates & Design
-----------------------------
English
-----------------------------
=> jQuery
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
===> Suggestions
-----------------------------
Deutsch (German)
-----------------------------
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
===> Vorschläge
-----------------------------
English
-----------------------------
===> Software bugs
-----------------------------
Deutsch (German)
-----------------------------
===> Softwarefehler
=====> Module / Extensions
-----------------------------
English
-----------------------------
=====> Modules / Extensions
-----------------------------
Deutsch (German)
-----------------------------
===> Erfahrungs und Testberichte
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...