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.

Donate with PayPal buttonSpenden mit dem PayPal-Button

  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • Show_menu2 adding strange code
  • Print
Pages: [1]   Go Down

Author Topic: Show_menu2 adding strange code  (Read 8842 times)

Offline svsanchez

  • Posts: 589
Show_menu2 adding strange code
« on: April 19, 2021, 07:45:38 PM »
Hello!

I am having a strange problem with SM2, which I am using for creating a list of pages inside of my categories via a CODE module.

This is what I have in the code module:

show_menu2(SM2_ALLMENU, SM2_CURR+1, SM2_CURR+1, SM2_ALL|SM2_ALLINFO, '<p><strong>[a][menu_title]</a>:</strong> [description]</p>', false, '');

This creates a list of subpages with their descriptions, like:



Which is what I want, HOWEVER, when you see the source of the page, this is what it shows:

<a class="section_anchor" id="wb_5886" name="wb_5886"></a><p><strong><a href="https://www.deguate.com.gt/guatemala/agricultura/agroquimicos.php" title="Agroquímicos en Guatemala" target="_top">Agroquimicos</a>:</strong> Encuentre aquí empresas dedicadas a la elaboración, importación y comercialización de agroquímicos en Guatemala. Insecticidas, herbicidas, fungicidas, fertilizantes, etc.</p></li><p><strong><a href="https://www.deguate.com.gt/guatemala/agricultura/cafe.php" title="Café en Guatemala" target="_top">Café</a>:</strong> Directorio de empresas cafetaleras en Guatemala. Cultivo, compra, venta y exportación de café guatemalteco. Tosta, mezcla y venta de cafés finos y orgánicos.</p></li>

As you can see, there is a lot of code that I didn't include in the SM2 code, like:
- <a class="section_anchor" id="wb_5886" name="wb_5886"></a>
- the ending </li> tag

That particular ending </li> tag is appearing many times as an error on the w3 html validator, and I would like to know how to get rid of it.

Where can I do this?
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8915
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Show_menu2 adding strange code
« Reply #1 on: April 19, 2021, 08:12:58 PM »
Hi, for code please use the code button # in the toolbar.

Your menu has only 6 parameters of 10. So show_menu fills the rest with the default parameters.
</p> should not be there

deafault:

Code: [Select]
<?php 
show_menu2
(
 
$aMenu = 0,
 
$aStart = SM2_ROOT,
 
$aMaxLevel = SM2_CURR+1,
 
$aOptions = SM2_TRIM,
 
$aItemOpen = '[li][a][menu_title]</a>',
 
$aItemClose = '</li>',
 
$aMenuOpen = '[ul]',
 
$aMenuClose = '</ul>',
 
$aTopItemOpen = false,
 
$aTopMenuOpen = false
 
)


in your case it could be

Code: [Select]
<?php
show_menu2
(SM2_ALLMENU, SM2_CURR+1, SM2_CURR+1, SM2_ALL|SM2_ALLINFO, '<p><strong>[a][menu_title]</a>:</strong> [description]', '</p>', false,false, false, false);
Logged
https://onkel-franky.de

Offline svsanchez

  • Posts: 589
Re: Show_menu2 adding strange code
« Reply #2 on: April 19, 2021, 11:58:44 PM »
Amazing! Thank you so much dbs!!!
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • Show_menu2 adding strange code
 

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