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 ... 7 8 [9] 10 11 ... 13   Go Down

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

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #200 on: September 06, 2007, 06:37:59 PM »
If I understand you correctly, you want to have
1) root level menu
2) child menu
3) an unrelated utility menu.

In this case I would dispense with the whole multiple menu mess, and instead create your menu as normal. In this menu, add a top level hidden item "Utility Menu" and then add all of the utility menu items underneath it. Then make the 3rd call to show_menu2 using that hidden menu item as the root.

i.e. See the sample page at http://code.jellycan.com/sm2test/
These are your menus.
1. Root Level Only
2. Children/Siblings
3. Hidden Menu

B
Logged

Offline ms

  • Posts: 4
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #201 on: September 07, 2007, 01:26:27 PM »
Hi,

I have a difficult question. I want to generate a menue with some graphical elements - different for each level - see here:



The black lines show the different (background)  images.

Is it possible and how can I do this with show_menu2?
Any help would be fine.

Thank You an best wishes

Mathias
« Last Edit: September 07, 2007, 01:28:04 PM by ms »
Logged

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #202 on: September 08, 2007, 04:00:00 AM »
Yes. Learn HTML and CSS and go for your life.

First create it yourself in straight HTML. Once you know how to do it,
you then automate it with a menu function like SM2.
See the documentation for what CSS classes SM2 creates.

B
Logged

spida

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #203 on: September 13, 2007, 02:41:11 PM »
Quote from: brofield on September 06, 2007, 06:37:59 PM
If I understand you correctly, you want to have
1) root level menu
2) child menu
3) an unrelated utility menu.

In this case I would dispense with the whole multiple menu mess, and instead create your menu as normal. In this menu, add a top level hidden item "Utility Menu" and then add all of the utility menu items underneath it. Then make the 3rd call to show_menu2 using that hidden menu item as the root.

i.e. See the sample page at http://code.jellycan.com/sm2test/
These are your menus.
1. Root Level Only
2. Children/Siblings
3. Hidden Menu

B


Hi Brofield,

tx for the explanation. I discarted the multiple menu stuff and now have simply three calls for show_menu2 in the code, just as you suggested.
I actually didn't need to change the calls for the main navigation and the menu with its children. The only thing I still don't understand (despite reading your documentation a couple of times) are the variables you use for the hidden menu:
show_menu2(0, 19, SM2_ALL, SM2_ALL), e.g. what is the 19 referreing to?

This menu is still not displayed, thus I would like to understand how the script works to get it work. :-)

Thank you in advance for some further assistance,
regards,
Ayshe
Logged

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #204 on: September 14, 2007, 03:30:08 AM »
It is the page ID for the parent item. Note that this item will not be displayed, only it's children will. You get this number by logging into the admin, clicking on the page that you want to be the parent as though you are going to edit it, and then reading the number out of the address bar.

e.g.
Login
Pages
click page you want as parent
address bar =
http://code.jellycan.com/sm2test/admin/pages/modify.php?page_id=19
The page_id is 19
put this into the show_menu2 call as the parent.

B
Logged

spida

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #205 on: September 19, 2007, 08:44:24 AM »
Thank you, Brofield. You rock!  :mrgreen:
Logged

deeve007

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #206 on: October 03, 2007, 09:29:35 PM »
Quote from: brofield on March 01, 2006, 03:33:51 AM
This menu won't show normally because of the invisible parent. However, you can show it in your template where-ever you want by specifying the ID of the invisible parent:
<?php show_menu2(1, **INVISIBLE_PAGE_ID**, SM2_ALL, SM2_ALL); ?>

Okay, got my utility menu displaying great with this code. Now my issue is with the breadcrumbs, which show the "hidden" parent page of the utility pages.

I'm using show_breadcrumbs() to display the breadcrumbs. Is there any way to have the breadcrumbs show a link to the Homepage followed by the name of the current utility page, but NOT show the hidden utility parent?

Thanks
Logged

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #207 on: October 04, 2007, 01:14:03 AM »
Use show_menu2 to show the breadcrumbs.  Add a link to the top menu manually.
See http://code.jellycan.com/sm2test/pages/oompa.php which is a page of a hidden
utility menu. Then look for "breadcrumbs". Copy and modify the code as necessary.

B
Logged

deeve007

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #208 on: October 04, 2007, 10:59:49 AM »
The breadcrumb code wouldn't show anything. I have show_menu2() working fine, but when using the following code absolutely nothing is displayed:

show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, '<span class="[class]"> > [a][menu_title]</a>', '</span>', '', '', '<b>You are here:</b> <span class="[class]">[a][menu_title]</a>');

Anyway, have decided to use echo PAGE_TITLE, very simple, to show where I am.

Next issue: I can't see anywhere that shows it possible to assign a class to each individual menu item, in case you want to use an image for each menu item. Easy to assign a class to a menu level, but is it possible to assign for each actual menu item?

And if not, I would suggest this as a fairly important addition to be made.
« Last Edit: October 04, 2007, 11:02:12 AM by deeve007 »
Logged

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #209 on: October 05, 2007, 01:10:44 AM »
Use the page id. i.e. class="page_[page_id] [class]"

B
Logged

lanesharon

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #210 on: December 13, 2007, 02:13:50 PM »
Brofield,  You might want to remove the references to the udm4 menu, since you are releasing your show_menu2 product as GPL.  udm4, per their website - "is not open-source or public domain software".  Read the rest here:
http://www.udm4.com/licensing/terms/

I have a menu that I use on another website that uses the popout feature.  You may want to look here for it:
http://www.xs4all.nl/~peterned/
« Last Edit: December 13, 2007, 07:31:02 PM by lanesharon »
Logged

Offline masarin

  • Posts: 56
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #211 on: March 11, 2008, 05:04:01 PM »
I am making my first WB Template and want it to be valid XHTML Strict.

When validating the template I get the error: there is no attribute "target"

The "<?php show_menu2(); ?>" prints the menu items like this:

<ul class="menu-top">
<li class="menu-sibling menu-first">
<a href="http://mysite/wb" target="_top">Hem</a>
</li>
</ul>

Q:
Is there a way to make show_menu2 print the "<a>" tags without the "target=" attribute?
Logged

doc

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #212 on: March 11, 2008, 05:35:29 PM »
Hello,

yes this is possible with the show_menu2 code snippet. Please read the documentation of the developer which explains what parameters you need to change (section FORMAT STRINGS).

Regards Christian
Logged

Offline masarin

  • Posts: 56
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #213 on: March 11, 2008, 08:44:40 PM »
Tnx.

Uhh, thats hard reading for a non PHP programmer, but I managed to come up with this that's vaidates as XHTML Strict:

Code: [Select]
<?php show_menu2(0, SM2_ROOT, SM2_CURR+1, SM2_PRETTY, &#39;[list][li]<a href="[url]">[menu_title]</a>&#39;); ?>

I then tried to add some other parameters like "SM2_MAX+1" to limit the menu to two levels (root an one sublevel) but then the whole menu disappeared. So I don't really understand the syntax here, it was just luck.

Guess I have to read the documentation a few times more then..
« Last Edit: March 12, 2008, 11:08:00 AM by masarin »
Logged

kozmoz

  • Guest
Re: show_menu2: collapsing at second level menu
« Reply #214 on: March 13, 2008, 12:24:21 PM »
We had a little issue with our menu.

When we displayed a page that was at the second level of the menu, suddenly all of its sibling items disappeared. Opening a child at the third level reveals the menu items again.

Now in the sm2_recurse() function I have added an extra check.
This fixed the bug we had, but I'm not sure if it's done right:

in include.php:
Code: [Select]
        else if ($aFlags & SM2_TRIM) {
            // parents and siblings of parents
            // Always show the siblings
            if (!array_key_exists('sm2_is_sibling', $page)
                && !array_key_exists('sm2_on_curr_path', $page)    // not set if false, so existence = true
                && !array_key_exists('sm2_path_sibling', $page)) {  // not set if false, so existence = true
                continue;
            }
        }
Logged

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #215 on: April 01, 2008, 03:47:57 PM »
kozmoz ->
How is your menu different to the test site? The following page is a second level menu with children. I don't see the same problem.
http://code.jellycan.com/sm2test/pages/enterprise/cogs-amp-wheels.php

Not saying that you haven't found a bug. Just clarifying.

B
Logged

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #216 on: April 10, 2008, 06:35:59 AM »
A little cleanup and re-release of Thorn's 4.41 version as 4.5. This has support for WB 2.7 (but maintains support for 2.6.7 still). Source repository is now available at http://code.google.com/p/showmenu2/

See http://code.jellycan.com/show_menu2/ for the download.

Tested with 2.6.7 but not with 2.7
Let me know if there are problems with 2.7
Logged

doc

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #217 on: April 10, 2008, 07:14:10 AM »
Thanks Brofield,

added your new version to the addons repostiory.

Regards Christian
« Last Edit: April 11, 2008, 08:01:06 PM by doc »
Logged

doc

  • Guest
show_menu2 German README available
« Reply #218 on: April 13, 2008, 09:35:34 AM »
Hello,

thanks to BerndJM, we have now a German README file for the show_menu2() code snippet. The German README_DE is included in the lateste code snippet version v4.50 on the Addons repository.

Bernd, thanks for this contribution, pretty sure many people out there will like it  :-)

Regards Christian
Logged

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #219 on: April 17, 2008, 09:18:55 AM »
Hello,

Recently I noticed a 'bug'? in the show_menu2 function along with the WB search function. When doing a search the menu dissapears. This only happens with multilanguage websites.

Example: go to the HELP page on this WB site and do a search; the vertical menu dissapears after the search. This is the exact problem that I'm facing for the last month when building my own multilanguage website.

See thread: https://forum.WebsiteBaker.org/index.php/topic,9206.msg55182.html#msg55182

My question is if there are more users who are formiliair with this issue? I already notified sir Brofield regarding this behaviour and hope that he can help me/us in this matter.

Sincerley
Knert
Logged
...:: Bake the Unbakable ::...

doc

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #220 on: April 17, 2008, 10:21:01 AM »
Hello,

well it is not really a bug of the show_menu function, it is more the way how WB handles search pages. The page_id is set to zero if you are using the search, therefore the menu disappears with the WB menu functions (show_menu) and the external menu function show_menu2().

Maybe Brofield find out a solution which works without changing WB core files, maybe we need to adapt WB core files, maybe both.

Regards Christian
Logged

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #221 on: April 17, 2008, 03:15:59 PM »
Hello,

Unfortenately Brofield is momentarily very busy and I respect that off course. So in a short term a solution from him would be difficult what is highly understandable.

So If anyone knows a solution for this issue on a short term or has a good working show_menu2 configuration regarding this issue then would you please share it with us. I would be heavenly greatfull since this topic is bugging me for a month now and I'm keep stretching up the deadline of my client  :|

Sincerly,
Knert

Logged
...:: Bake the Unbakable ::...

doc

  • Guest
show_menu2 version 4.60 released
« Reply #222 on: April 22, 2008, 09:11:10 PM »
Hello,

just released show_menu2 version 4.60 which includes the page_id = 0 bug fix from Brofield on the addons repository.
If your menu disappears after submitting a search, follow the steps below (requires show_menu2 v4.60 or higher)

Step 1: Add the following input field to the database search settings after
the <form> open tag: WB Backend -> Settings -> Show advanced settings -> Search Settings -> Header
Code: [Select]
<input type="hidden" name="referrer" value="[REFERRER_ID]" />
Step 2: In the index.php of your template, add the following input field immediately following the search <form> open tag.
Code: [Select]
<input type="hidden" name="referrer" value="<?php echo defined(&#39;REFERRER_ID&#39;)?REFERRER_ID:PAGE_ID;?>" />

Brofield thanks for this bugfix.

Regards Christian
« Last Edit: April 22, 2008, 09:17:33 PM by doc »
Logged

Offline bupaje

  • Posts: 592
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #223 on: May 09, 2008, 09:35:55 AM »
Hi. I get this error in the scripts.log I have error level set to E_Error which I read is for fatal errors but show_menu2 seems to work great as always. I am setting up new pages so some of the subpages have no content yet which I guess is possible.

Code: [Select]
show_menu2 error: no flags from group 1 supplied! Exactly one flag is required!

I only noticed it because the error file has gotten huge .

Thanks.

Logged

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #224 on: May 10, 2008, 10:11:27 AM »
Read the documentation and check the parameters you are using again. You're not passing the correct flags to the function for the $aFlags parameter.
http://code.jellycan.com/files/show_menu2-README.txt
Logged

  • Print
Pages: 1 ... 7 8 [9] 10 11 ... 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