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

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

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #275 on: February 20, 2009, 09:11:16 PM »
Hi,

it's 'cause you format the .menu a:link, .menu a:visited, .menu a:active  with display: block in your screen.css

Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Peter R

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #276 on: February 20, 2009, 09:42:18 PM »
Thanks for the fast response.
I have no idea what the block was doing there. It was in the template I started with.
To be honnest, I don't even knew block excised.

Got it working now.
Thank again!
Logged

hexa86

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #277 on: March 08, 2009, 11:33:36 PM »
Hi guys, hi community,

I really appreciate your work on show_menu2, and I just use it while creating a website with website baker but I have one simple question:

I just read your documentation about it, but I was wondering if/how it is possible to address every single generated menu entry for itself. Sorry, if you don't understood me, but English is a foreign language for me :(

Why do I need this? I just want to give every entry a different color with CSS. But I have no clue how to adress the generated entries.

I use the template called "module_finder" and that's my relevant code snippet out of it:

Code: [Select]
<div id="nav">
            <?php show_menu2(0, SM2_ROOT, SM2_ALL, ( SM2_ALL | SM2_NUMCLASS), &#39;<li><a href="[url]" class="[class] navlev[level]">[menu_title]</a>&#39;, "</li>", &#39;<ul class="ullev[level]">&#39;, "</ul>", true, &#39;<ul id="header_menu" class="menu">&#39;);
            //show_menu2(0, SM2_ROOT, SM2_ALL, ( SM2_ALL | SM2_NUMCLASS), false, "\n</li>", false, false, false, &#39;<ul id="header_menu" class="menu">&#39;); 
?>
<br style="clear:left;"/>
        </div><!-- end nav -->

at the moment I only adress all generated entries with #nav in my external css-file, because I do not know how to adress them seperately.

I'd really appreciate your help, and I hope you can tell me whether this is possible or if it is possible a different way. Thank you in advance!

greets
christoph
Logged

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #278 on: March 09, 2009, 03:34:30 AM »
I just added this entry to the FAQ. Does that help you?

http://code.jellycan.com/files/show_menu2-README.txt
Q:  How do I use a different class/picture/color/widget for each entry in a menu?

B
Logged

hexa86

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #279 on: March 09, 2009, 11:19:10 AM »
Thanks for your really fast reply. That's real SUPPORT, man. I just took a short look at it, but after work I will check it out in detail, it really looks the way I can use it however.

You made my day.
Logged

WebBird

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #280 on: March 30, 2009, 04:47:44 PM »
Hi,

show_menu2 is great, but not very easy to use. So, I thought about something like a backend, or even a "code generator". You may think of it as a "Wizard" where you make some choices an get the correct SM2 code to use.

Would that be something of interest?
@brofield: Would you be interested in helping me doing this? :-D I would do the "backend" or "generator", but I'm sure I need help in some cases. :roll:
Logged

Offline virgil

  • Posts: 179
  • Gender: Male
  • Carpe diem!
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #281 on: March 30, 2009, 05:07:42 PM »
Quote from: WebBird on March 30, 2009, 04:47:44 PM
... show_menu2 is great, but not very easy to use. So, I thought about something like a backend, or even a "code generator". You may think of it as a "Wizard" where you make some choices an get the correct SM2 code to use.
Would that be something of interest?

oh yes yes yes, please!  :roll:

so long
virgil
Logged
Virgil - the pre-baked-stuff baker -   ;-))

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #282 on: March 31, 2009, 03:03:26 AM »
I'm not interested but knock yourself out. That is what I built the demo site for.
http://code.jellycan.com/sm2test/pages/time/procrastination.php
Logged

WebBird

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #283 on: March 31, 2009, 09:47:25 AM »
I know that site, but I hear very often that people have problems using show_menu2 all the same. (Me, too, though I'm a developer. I took some answers from the module's code, but most people can't do that.)
Logged

Offline Xagone

  • Posts: 482
  • Gender: Male
  • Developper
    • Xagone Inc
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #284 on: April 02, 2009, 02:23:27 AM »
i've search and cant fond that ...

how can i identify my base root parent ?

i've got 2 languages

in hierarchy

french
-home
-stuff
-- substuff
english
-home
-stuff
-- substuff

how can i do something like "if this menu is my base parent, do not show it" so that when in french, only english shows, and in english only french shows... ?

right now I use :
Code: [Select]
show_menu2(2, SM2_ROOT, SM2_START, SM2_ALL,'<a href="[url]" target="[target]" class="home">[menu_title]','</a>','','');
« Last Edit: April 02, 2009, 02:35:28 AM by VotreEspace »
Logged
Xagone Inc. (formerly VotreEspace)
http://xagone.com/

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #285 on: April 02, 2009, 04:21:18 AM »
hi Espace,

at a first hint:
your root is french / english that you wont to display
so your startlevel is SM2_ROOT + 1

Hope I understand your question right ....

Regards Bernd
« Last Edit: April 02, 2009, 04:35:38 AM by BerndJM »
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Offline Xagone

  • Posts: 482
  • Gender: Male
  • Developper
    • Xagone Inc
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #286 on: April 02, 2009, 02:12:20 PM »
Nope, doesnt do the trick, thanks for the help.

what i want

when in french, show the menu "english"
when in english, show the menu "french"
Logged
Xagone Inc. (formerly VotreEspace)
http://xagone.com/

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #287 on: April 05, 2009, 01:31:26 PM »
Easier to just hardcode that sort of menu, but if you really want to do it then show just the top level menu (see "root"). Then add conditional formatting to exclude the current menu item (2).

(1) http://code.jellycan.com/sm2test/#root
(2) http://code.jellycan.com/sm2test/pages/conditional/show-only-siblings.php
Logged

Offline Xagone

  • Posts: 482
  • Gender: Male
  • Developper
    • Xagone Inc
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #288 on: April 05, 2009, 02:30:28 PM »
thanks brofield... but, already tried and missed.

that's why I asked... i think i'll go with php something like this :

if (page language is french) then {show english menu} else {go with french}
Logged
Xagone Inc. (formerly VotreEspace)
http://xagone.com/

vanbemmel

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #289 on: April 06, 2009, 06:04:15 PM »
Hi, i use showmenu2 on a site where i display only subitems with this tag:

<?php
show_menu2(
    $aMenu          = 0,
    $aStart         = SM2_ROOT+1,
    $aMaxLevel      = SM2_CURR+1,
    $aOptions       = SM2_TRIM,
    $aItemOpen      = '<a href="[url]" target="[target]" [if(level==1){ class="nav"}][if(level==2){ class="sub"}]>[if(level==2){- }][menu_title]</a>',
    $aItemClose     = '',
    $aMenuOpen      = '',
    $aMenuClose     = '',
    $aTopItemOpen   = false,
    $aTopMenuOpen   = false
    )
?>           

But when you're on a hidden page the subitems of that page are not displayed in the menu either.
When i change the current page to "not hidden" the submenu's are displayed well.\

Is it possible to change this code so submenu's are also displayed on hidden pages ?

Thank you.
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #290 on: April 06, 2009, 06:11:47 PM »
 I am not a coder, but based on my experience with WB, SM2 can not see hidden pages, if they are shown in menu, then they are not hidden, right :)))) and if SM2 can not see them, it can not create submenu :P correct me if i m wrong :)
Logged
Web developer

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #291 on: April 07, 2009, 02:27:35 AM »
http://code.jellycan.com/sm2test/pages/parent/hidden-kids.php#currchild
This page is a hidden page that has children. Those children are shown correctly, see the test "currchild".

I guess the problem is you use of SM2_ROOT + 1 as the start. SM2 won't traverse through the hidden page to show the children. It doesn't even store information about hidden pages at the moment. It could be fixed to do so, but don't hold you breath waiting.
Logged

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #292 on: April 08, 2009, 10:07:04 AM »
Ok. I take that back, it is a bug. Fixed in version 4.8.
Download at http://code.jellycan.com/show_menu2/

See output with the following hidden pages:
http://code.jellycan.com/sm2test/pages/parent/hidden-nokids.php
http://code.jellycan.com/sm2test/pages/parent/hidden-kids.php
http://code.jellycan.com/sm2test/pages/parent/hidden-kids/child2.php

Cheers,
B
Logged

scottm52

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #293 on: May 06, 2009, 10:04:11 PM »
Having a coding quandry...  Have used show_menu2 with alot of sites.  But this time a customer haded over a template that is very convoluded and complex.  And the css is damned near unreadable.

But, I have show_menu2 doing it.  Cool.  With a noted exception..  not so cool, and hence the question.

They're governing the highlighting of athe current page with a unique page id  Which I can discover programmatically with SM2 pretty easily.

Code: [Select]
<?php show_menu2(0, SM2_ROOT, SM2_ALL, &#39;<li>[a] [if(id=current){id="current_tab"}] [menu_title] [/a]</li>&#39;); ?>
Now if you look close that call just won't work.  But how would I set a hard id with an evaluation like this?

THX
Logged

scottm52

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #294 on: May 07, 2009, 03:21:51 AM »
Quote from: scottm52 on May 06, 2009, 10:04:11 PM
Having a coding quandry...  Have used show_menu2 with alot of sites.  But this time a customer haded over a template that is very convoluded and complex.  And the css is damned near unreadable.

When in doubt..  change the code...  I went with the more sturctured call and it made it tons easier to debug...

<?php show_menu2(
    $aMenu          = 0,
    $aStart         = SM2_ROOT,
    $aMaxLevel      = SM2_ALL,
    $aOptions       = SM2_TRIM,
    $aItemOpen      = '<li><a href="[url]" id="[if(id==current){updates_tab}]"> [menu_title] [/a]',
    $aItemClose     = '</li>',
    $aMenuOpen      = '<ul id="tabMenu">',
    $aMenuClose     = '</ul>',
    $aTopItemOpen   = false,
    $aTopMenuOpen   = false
    )
?>

Logged

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #295 on: June 11, 2009, 08:52:27 PM »
Dear Brofield.

I just updated the show_menu2 on one of my Websites and had to downgrade again.
It has to do with the "bugfix" described on your Homepage:

Quote from: http://code.jellycan.com/show_menu2/
History
4.8 (8 Apr 2009)
Fixed output of menu when a hidden page is the current or parent page.
While this was declared as a Bug, I used it as a Feature - several times.

My question regards to a kind of fallback, if one still wants to "hide" all pages which are marked as "hidden" in the backend.
Is there a parameter for the $aOptions-Call I may use to achieve this?

I still want to use this as a Feature where this is appropriate to my design needs.

Kind regards,
Stefek
« Last Edit: June 11, 2009, 08:54:54 PM by Stefek »
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

brofield

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #296 on: June 12, 2009, 02:11:36 AM »
Hi Stefek,

The fix that I put in should be what most people are after.

The menu item "Parent" that you can see in the full menu here:
http://code.jellycan.com/sm2test/pages/parent.php#full

Has a number of hidden children that can only been seen if you are displaying the hidden page.
http://code.jellycan.com/sm2test/pages/parent/hidden-kids.php#full

This is usually done via a reference to that page id directly, using it as the root.
http://code.jellycan.com/sm2test/#hidden

Would you describe what your problem is for me and how it differs from this usage? Short examples are always good.

B
Logged

amitmalka

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #297 on: July 02, 2009, 06:02:24 PM »
how i  do like udm but that work ....with the showmenu2
Logged

vanbemmel

  • Guest
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #298 on: July 23, 2009, 04:46:51 PM »
How can I display show_menu2 at a (non WB) php page?

I have a site that consist of WB and normal php pages.
Now I would like to display the WB menu also at those php page dynamically.

Any help would be appreciated.
Logged

Offline bupaje

  • Posts: 592
Re: show_menu2: valid XHTML and CSS selectable menus
« Reply #299 on: July 23, 2009, 04:56:31 PM »
I had some non WB php pages I put the menu in previously. In my case I created a page called inserts and then put menus and other dynamic elements  as subpages. I made them hidden and used a blank template

+inserts/
 -menu
 -news

then I used an include statement to call these into the non WB pages.
« Last Edit: July 23, 2009, 04:58:58 PM by bupaje »
Logged

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