Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 12, 2012, 05:28:58 PM
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
.
149667
Posts in
21100
Topics by
7538
Members
Latest Member:
ionline
WebsiteBaker Community Forum
English
Templates, Menus & Design
(Moderator:
Argos
)
show_menu2: valid XHTML and CSS selectable menus
Pages:
1
...
5
6
[
7
]
8
9
...
13
Go Down
Author
Topic: show_menu2: valid XHTML and CSS selectable menus (Read 99470 times)
yppds
Offline
Posts: 32
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #150 on:
October 26, 2006, 06:35:24 AM »
Thanks Brofield and Kweitzel for your responses.
@Brofield: You are right and perhaps it wasn't clear enough what I needed.
The reason I use UDM, is exaclty because I want to present popup menus!
Imagine that you have the structure I wrote before. My menu can only afford 3 links in the main page ( Home Page, News and Pictures). Here is the issue:
1. I use SM2_ROOT+1, because I don't want to display the EN and DE pages. I deal with them as described in the wiki of websitebaker. This works great.
2. So when the page loads, you can see the above 3 links and an arrow on the left of the 2 categories that have sub-links. When you mouse over the News category for instance, a popup window will be displayed to show News1 and News2 links. This is great and works fine. The problem starts when you click for instance on News1 link. Then the arrow on the PICTURES category is hidden/collapsed and you can only see the menu of the News category. This is my problem! Why it has to collapse, since the popup menu should always be expanded, nomatter which sub-link of a category you choose.
3. I use SM2_TRIM because I only want to show the contents of the EN page or DE page depending on language selection. Also, mind you that I only have space for 3 links! These links are different, 3 for English and 3 for Deutch, but they can be arranged to show properly only using the SM2_TRIM function.
I guess what I'm looking for is an modification that will help many folks when trying to create a multilingual site with popup menus.
Logged
yppds
Offline
Posts: 32
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #151 on:
October 26, 2006, 09:02:06 AM »
Hi,
I guess I have figured a way to overcome this issue, but I would like your help on the following:
Below is the site structure :
en
->home page
->News
->->news1
->->news2
->Pictures
->->Pictures 1
->->Pictures 2
de
->startseite
->Neues
->->neues1
->->neuses2
->Bilder
->->Bilder1
->->Bilder2
How can I make it using show_menu2 to show when clicking the English language only the English menu and when clicking the Deutch site only the Deutch menu. Currently I'm using the following:
show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_ALL, false, "\n</li>", false, false, false, '<ul class="udm" id="udm">');
Any help would be greatly appreciated.
THanks again guys1
Logged
kweitzel
Forum administrator
Offline
Posts: 6820
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #152 on:
October 26, 2006, 03:42:05 PM »
On my sites weitzel.info/nethome and weitzel.biz I created menu links to the language top pages refering to the language homepage.
Then, i think you would use following SM2 Code:
Code:
1) show_menu2(0, SM2_ROOT+1, SM2_CURR+1);
2) show_menu2(0, SM2_ROOT+1, SM2_CURR+1, SM2_ALL, false, "\n</li>", false, false, false, '<ul class="udm" id="udm">');
1) Is the original "Children/Siblings" code from the SM2 Page
2) I think would be your UDM Code for that issue
Additionally a browser redirect script in the intro page (beware of the issues with it!) which selects one page by default (or, if you have the script also to select basesd on browser language).
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #153 on:
November 02, 2006, 02:00:07 AM »
Version 3.9 now available at
http://code.jellycan.com/show_menu2/
Support test for not-equals and non-existence of classes in the conditional formatting. i.e. the != operator
Support the equals operator as the double-equals (==) that most people are used to (although single equals (=) is still supported for backward compatibility)
B
Logged
dw2006
Offline
Posts: 3
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #154 on:
December 19, 2006, 12:45:03 PM »
Hi,
this is a very fantastic tool and I thank you!
One question: I would like to display ONLY the siblings of the current page, yet not the current page and nothing else. Is there an easy way to do that?
Currently I am using the following code, which shows ALL sublings within the category:
Code:
show_menu2(0, SM2_CURR, SM2_CURR, '','- [a][menu_title]</a><br>','','','<br>');
Thanks, greetings, and happy holidays/christmas/chanukkah/kwanzah/festivus etc.!
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #155 on:
December 19, 2006, 01:00:03 PM »
Sure. Use the conditional formatting and exclude the current item.
show_menu2(0, SM2_CURR, SM2_CURR, '','[if(class!=menu-current){- [a][menu_title]</a><br>}]','','','<br>'); ?>
For it working, see
http://code.jellycan.com/sm2test/
Search for the test case "Show only siblings (not current)"
Logged
dw2006
Offline
Posts: 3
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #156 on:
December 19, 2006, 01:15:19 PM »
Wow, now that was a lightening fast response. Thanks!
To quote Steve Jobs: One more thing
...
Is there a way to have the name of the
parent
in the menu's header?
What I mean is a result like:
Code:
Other pages in the category "XYZ" are:
- sibling
- another sibling
(Right now it is "other pages in this category" without saying what category it currently is...)
Greetings and Thanks again!
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #157 on:
December 19, 2006, 01:21:51 PM »
Probably. What you are trying to do is call sm2 such that it only outputs the title of the current page. i.e. change the output format to show only the page name. Then restrict the processing to only the current level. Then use conditional formatting to exclude everything except the current page. I'll leave the actual code as an exercise in thinking for yourself.
Logged
dw2006
Offline
Posts: 3
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #158 on:
December 19, 2006, 01:28:41 PM »
thanks for showing the logic of this. Something for me to do over the holidays! I will feel like a real hacker!
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #159 on:
December 19, 2006, 03:48:14 PM »
Actually no. I missed that you wanted the parent page. The current page is available via PAGE_TITLE, but the parent page isn't and I don't think that there is a way to get it via the current SM2. Try the new version 4.0 and see the example at
http://code.jellycan.com/sm2test/pages/conditional/show-only-parent.php
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #160 on:
December 19, 2006, 03:50:40 PM »
Version 4.0 now available at
http://code.jellycan.com/show_menu2/
Support for greater than equal (>=), less than equal (<=) logic in conditional formatting.
Added ability to test against page level and page ID in the conditional formatting.
Removed the sm2_ prefix from the legacy functions in legacy.php so that when including this file the standard show_menu and page_menu functions are transparently redefined to use show_menu2.
B
Logged
kweitzel
Forum administrator
Offline
Posts: 6820
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #161 on:
December 19, 2006, 03:53:47 PM »
That sounds like a good update, thanks ... downloded it and will have a look later.
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
berkeweb
Offline
Posts: 5
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #162 on:
January 06, 2007, 09:53:05 AM »
Hi,
I am a WB-Newbie and I have installed the show_menu2 code snippet and it works fine. But I want to make some changes to the menu layout but I am not quite sure how. Here is the menu as it looks now:
I would like to replace the bullet points with an image. How can I do that and where do I have to make the necessary changes: include.php or legacy.php or screen.css or index.php?
I hope you can help with this and I thank you for your support in advance.
Take care
Axel
Logged
kweitzel
Forum administrator
Offline
Posts: 6820
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #163 on:
January 06, 2007, 10:01:29 AM »
Hi Axel, it is the screen.css file, where you make the required changes. Please have a look ath the sourcecode of a rendered page to find out the css classes.
A good resource for styling with lists is css.maxdesign.com.a
u There you find listamatic (simple lists) and listamatic 2 (nested lists, what you need here) also they have a listutorial which is quite good.
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
berkeweb
Offline
Posts: 5
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #164 on:
January 06, 2007, 02:42:53 PM »
Hi Klaus,
thank you for recommending css.maxdesign.com.a
u this is a very good css source and it helped me a lot so far. But still I have a question since my menu looks far better than this morning but there is one little thing that I cannot find a solution for:
As you can see, the sub menu items "Projekt 1 and "Projekt 2" are not in order since they belong to the main menu item "Projekte". And the "Shop" item should be the next main item and not somewhere inbetween. Also the line-spacing is not quite similar between the main items and the sub menu items. Do have an idea how to fix these problems?
Here is the css-code for the menu posted above:
Code:
ul
{
margin-left: 0;
padding-left: 0;
list-style: none;
}
li
{
padding-left: 32px;
padding-top: 17px;
background-image: url(zahn_single.png); height: 35px;
background-repeat: no-repeat;
background-position: 0.1em;
}
.menu {
}
.menu a {
font-size: 14px;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #ffffff;
font-weight: bold;
vertical-align: middle;
text-align: left;
text-decoration: none;
background-position:left;
background-repeat:no-repeat;
padding: 2px 0px 2px 2px;
height: 35px;
}
.menu a:hover {
font-size: 14px;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000000;
font-weight: bold;
vertical-align: middle;
text-align: left;
text-decoration: none;
background-repeat : repeat-y;
background : url(menu_hover.png) repeat-y left;
}
I hope that I am not annoying you with these beginner questions.
Take care
Axel
Logged
kweitzel
Forum administrator
Offline
Posts: 6820
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #165 on:
January 06, 2007, 09:45:27 PM »
You are dealing here with a nested lists. So what you actually need is the "li li" selector ... have a look at maxdesigns nested lists model to get there.
What you see is the "misunderstanding" within the li-items. Because, if you look at the sourcecode, you will find, that the order of items is correct.
And please have a look at your charset settings ... there is also a lot of information in the german subboard about this
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
bgg
Offline
Posts: 101
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #166 on:
February 26, 2007, 04:07:47 AM »
How can I display only the:
1. current level
2. child level
I want to "display the siblings of the current lebel only, including the current page also" on the left block:
http://wb.asiasrc.org/
Thanks
«
Last Edit: February 26, 2007, 04:35:03 AM by bgg
»
Logged
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7663
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #167 on:
February 26, 2007, 06:47:40 AM »
Hello,
documentation you find here:
http://code.jellycan.com/files/show_menu2-README.txt
Matthias
Logged
gavjof
Offline
Posts: 89
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #168 on:
March 14, 2007, 02:13:02 PM »
Hi,
I'm using the following to show a site map for current level pages complete with descriptions:
Code:
// Site Map Menu Call
show_menu2(0, SM2_CURR+1, SM2_CURR+1, SM2_ALL|SM2_ALLINFO, '[li][a][page_title]</a> <br /><blockquote class="highlight">[description]</blockquote>', false, '<ul class="sitemap [class]">');
This works great with certain templates (tested with
round
but when I try using another template it only returns.
Quote
[description=UNKNOWN]
I tried changing the doctype, amongst other things but I'm still confused as to what is causing this.
Any ideas?
Cheers
gav
Logged
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7663
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #169 on:
March 14, 2007, 03:05:30 PM »
Hello,
Quote
using another template
Wich did you try?
[description] i think is a variable of WB wich has nothing to do with the template. But if you have no description of a page no descritpion could be displayed.
Matthias
Logged
gavjof
Offline
Posts: 89
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #170 on:
March 14, 2007, 03:10:16 PM »
A new one I'm busy designing for a client.
I also tried the "allcss2" which did not work either.
Like I say - It worked with the default "round" template.
But that template uses "page_menu" to call it's menu. It could be that by using "show_menu2" in other places (in this new template) it is affecting the menu call that uses the [description] variable.
**EDIT**
Yes, all the pages do have a description and I works accordingly in the *round* template.
«
Last Edit: March 14, 2007, 03:37:47 PM by gavjof
»
Logged
gavjof
Offline
Posts: 89
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #171 on:
March 14, 2007, 03:49:17 PM »
I've done a few tests and discovered it's down to the code used for the breadcrumbs:-
Code used from demos,
http://code.jellycan.com/sm2test/
Code:
show_menu2(0, SM2_ROOT, SM2_MAX+2, SM2_CRUMB, ' > [a][menu_title]</a>', '', '', '', '<strong>You are here:</strong> [a][menu_title]</a>');
If I remove this menu call the other menu (showing the [description] variable) works fine.
Logged
brofield
Offline
Posts: 224
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #172 on:
March 14, 2007, 06:33:34 PM »
Quote from: gavjof on March 14, 2007, 02:13:02 PM
I'm using the following to show a site map for current level pages complete with descriptions:
... using SM2_ALLINFO ...
... but when I try using another template it only returns.
[description=UNKNOWN]
As is written clearly in the documentation at
http://code.jellycan.com/files/show_menu2-README.txt
SM2_ALLINFO
Load all fields from the page table of the database. This will result in quite a lot of memory being used and is not recommended, however it will make keywords, descriptions, and other fields available. This data is not loaded by default.
NOTE: This flag must be used on the *FIRST* call to show_menu2 *for this menu ID*, or in combination with SM2_NOCACHE otherwise it will have no effect.
Make sure that SM2_ALLINFO is being used in all calls to sm2 in the template.
Brodie
Logged
gavjof
Offline
Posts: 89
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #173 on:
March 15, 2007, 12:44:38 PM »
Nice one, I never read that far
All good now.
Logged
hobo_geek
Offline
Posts: 4
Re: show_menu2: valid XHTML and CSS selectable menus
«
Reply #174 on:
March 22, 2007, 05:09:58 PM »
So I have a small problem. I'm using show_menu2 to create a dropdown box menu. However, I can't seem to get it to work. I know I must be doing something stupid with the <option> in it. Here is the code:
Code:
<select name="drop_menu">
<?php show_menu2
(
0
,
SM2_ROOT
,
SM2_START
,
'<option value="[menu_title]">[a][menu_title]</a>'
,
'</option>'
);
?>
</select>
Any help will be appreciated. Thanks.
Logged
Pages:
1
...
5
6
[
7
]
8
9
...
13
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...