WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show_menu2: valid XHTML and CSS selectable menus
  • Print
Pages: 1 ... 5 6 [7] 8 9 ... 13   Go Down

Author Topic: show_menu2: valid XHTML and CSS selectable menus  (Read 267094 times)

Offline yppds

  • Posts: 38
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #150 on: October 26, 2006, 07: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

Offline yppds

  • Posts: 38
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #151 on: October 26, 2006, 10: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

Offline kweitzel

  • WebsiteBaker Org e.V.
  • **
  • Posts: 6983
  • Gender: Male
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #152 on: October 26, 2006, 04: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: [Select]
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

brofield

  • Guest
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

  • Guest
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: [Select]
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

  • Guest
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

  • Guest
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: [Select]
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

  • Guest
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

  • Guest
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

  • Guest
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

  • Guest
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

Offline kweitzel

  • WebsiteBaker Org e.V.
  • **
  • Posts: 6983
  • Gender: Male
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

berkeweb

  • Guest
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

Offline kweitzel

  • WebsiteBaker Org e.V.
  • **
  • Posts: 6983
  • Gender: Male
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

berkeweb

  • Guest
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: [Select]
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

Offline kweitzel

  • WebsiteBaker Org e.V.
  • **
  • Posts: 6983
  • Gender: Male
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

Offline bgg

  • Posts: 103
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

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
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

  • Guest
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: [Select]
// 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

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
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

  • Guest
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

  • Guest
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: [Select]
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

  • Guest
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

  • Guest
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  :oops:
All good now.
Logged

hobo_geek

  • Guest
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]
<select name="drop_menu">
<?php show_menu2(0, SM2_ROOT, SM2_START, &#39;<option value="[menu_title]">[a][menu_title]</a>&#39;, &#39;</option>&#39;); ?>
</select>

Any help will be appreciated. Thanks.
Logged

  • Print
Pages: 1 ... 5 6 [7] 8 9 ... 13   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show_menu2: valid XHTML and CSS selectable menus
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2