WebsiteBaker Support (2.8.x) > Templates, Menus & Design

show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!

<< < (2/5) > >>

BerndJM:
O.k.

let's have a lookm into the readme file:


$aOptions 
Specify flags for different generation options for the menu. The flags
may be combined together using bitwise OR (|). For example, to specify
both TRIM and PRETTY you should use, (SM2_TRIM | SM2_PRETTY).

GROUP 1
-------
Exactly one flag from this group must always be supplied. These flags
affect how the siblings in the tree are removed from the output.
   
GROUP 2
-------
All of these flags are optional. Any number of them may be combined.

Regards Bernd

Craxx:
Hello Bernd,

thx for answer. Yes i read that in readme, but did you read my post? I have no error, when there is only


<?php show_menu2(0, SM2_ROOT, SM2_START); ?>    

and

<?php show_menu2(0,      SM2_ROOT+1, SM2_CURR+1);?>

Only when there is

<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, '<dt>[a][menu_title]</a>', '</dt>', '<dl class="nav3-grid">' , '</dl>');?>

there is an error.

Here you can see my work:
http://www.anglerbund-ansbach.de/wb/

I am a rookie in programming and the first problem ist that the original template has the same problem. Perhaps somebody could help me. Here is the original template:

http://www.websitebaker2.org/template/pages/templates.php?id=73&Keywords=multiflex

THX a lot and best regards
Craxx;)

Argos:
Try replacing <dt> and </dt> with <li> and </li>
And replacing <dl> and </dl> with <ul> and </ul>

Don't forget modifying your stylesheet.

And try to get rid of the errors, your site doesn't validate. See http://validator.w3.org/

I wouldn't mind too much though, the menu seems to be working fine.

DarkViper:

--- Code: (your code) ---<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, &#39;<dt>[a][menu_title]</a>&#39;, &#39;</dt>&#39;, &#39;<dl class="nav3-grid">&#39; , &#39;</dl>&#39;);?>

--- End code ---
your call of 'show_menu' is definitely wrong.

take a look to the definition. and do not forget the simple math.-rules about brackets.


--- Code: ---<?php  show_menu2( [$aMenu,[$aStart,[$aMaxLevel,[$aOptions,[$aItemOpen,[$aItemClose,[$aMenuOpen,[$aMenuClose,[$aTopItemOpen,[$aTopMenuOpen]]]]]]]]]] ); ?>

--- End code ---

BerndJM:
Again the f**** manual:

$aMenu will be 0 for most people.

$aStart must be either a page ID or a value starting with "SM2_".

$aMaxLevel must be only values that start with "SM2_".

$aOptions must be only values that start with "SM2_" (unless you are
in a very small minority of users).

All other parameters are the HTML tag templates that will be
output for menus and menu items.

What this mean in your case?

--- Code: ---$aMenu = 0,
$aStart = SM2_ROOT+1,
$aMaxLevel =  SM2_CURR+1,
$aOptions = '<dt>[a][menu_title]</a>'

--- End code ---
You have the HTML-Syntax for $aItemOpen as $aOptions ...

Regards Bernd

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version