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 »
  • Help with menu... :O
  • Print
Pages: [1]   Go Down

Author Topic: Help with menu... :O  (Read 3860 times)

jamie84

  • Guest
Help with menu... :O
« on: September 10, 2009, 09:56:07 AM »
<?php show_menu(); ?> Displays the menu. Where could I edit the layout for each link? (What I'm trying to do is add some div's around each link.)

Hmmmm...
Logged

erpe0812

  • Guest
Re: Help with menu... :O
« Reply #1 on: September 10, 2009, 11:25:57 AM »
Hi

Quote
<?php show_menu(); ?>
is an old function that can be replaced with
Code: [Select]
<?php show_menu2(); ?>
SM2 is included in package WB 2.7 or 2.8, please have a look to the demo and documentation.

rgds

erpe
Logged

jamie84

  • Guest
Re: Help with menu... :O
« Reply #2 on: September 10, 2009, 12:01:36 PM »
No...

I mean what file something like this would be in...

function show_menu(
    $aMenu          = 1,
    $aStartLevel    = 0,
    $aRecurse       = -1,
    $aCollapse      = true,
    $aItemTemplate  = '<li><span[class]>[a][menu_title][/a]</span>',
    $aItemFooter    = '</li>',
    $aMenuHeader    = '<ul>',
    $aMenuFooter    = '</ul>',
    $aDefaultClass  = ' class="menu_default"',
    $aCurrentClass  = ' class="menu_current"',
    $aParent        = 0
    )

That was found in /modules/show_menu2/legacy.php

I need to edit the backbone that lays out all the links in the menu.

It currently displays links as:

Code: [Select]
<li><span class="menu_current"><a href="http://127.0.0.1/cms" target="_top" class="menu_current"> Home </a></span>
</li>

But I want to change it to:

Code: [Select]
<div class="navitem"><a href="http://127.0.0.1/cms><span id="homeicon" class="navicon"></span>Home</a></div>

Logged

erpe0812

  • Guest
Re: Help with menu... :O
« Reply #3 on: September 10, 2009, 12:13:34 PM »
Yes

please read the docu , insert a code like

Code: [Select]
<?php show_menu2(0,SM2_ROOT, SM2_ALL,SM2_TRIM|SM2_PRETTY); ?>
read the html output and format the classes............ ...

rgds

erpe
Logged

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: Help with menu... :O
« Reply #4 on: September 10, 2009, 01:30:59 PM »
Quote from: jamie84 on September 10, 2009, 12:01:36 PM

Code: [Select]
<div class="navitem"><a href="http://127.0.0.1/cms><span id="homeicon" class="navicon"></span>Home</a></div>
How many  levels has your Menu.
Also the "output" you provide is a little to little :-D

Give at least 3 Menu Items in your Output.
If you have also subLevels, show also the output of them.

I wonder why you want to obstain from list-items <li> in you menu.
But anyway, with ShowMenu2 it is possible, of course.

Regards,
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

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Help with menu... :O
 

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