WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!
Hans:
Hi jacobi22
I find it very, very hard to understand the working of show_menu2. E.g.
I can't find anything wrong in this code:
--- Code: ---<?php show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_PRETTY, '<li><a href="[url]" class="[class]"><span>[menu_title]</span></a>', "</li>", '<ul>', "</ul>", true, '<ul id="main-menu" class="sm sm-mint">' , '</ul>'); ?>
--- End code ---
But I keep getting
--- Quote ---[13-Feb-2017 14:44:42 Etc\/UTC] show_menu2 error: $aOptions is invalid. No flags from group 1 supplied!"
--- End quote ---
In my humble opinion my code is equal to the code you provided (except specific elements of course). Being a little bit dyslectic I can imagine that I don't see something wrong but after looking for what seems the 1000th time time I really can't get a solution for the error message.
Hope you can get me on the right path ;-)
jacobi22:
do you have more Show_menu2-Call's in your template?
the menu from your last posting produce no errors
look to the fourth place in the menu call
show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_PRETTY,
#1 = Number of the menu / Menu-ID
#2 = Start-Level
#3 = max Level
#4 = Option
Option has two groups -
Group1: () Exactly one flag from this group must always be supplied.
SM2_ALL or
SM2_TRIM or
SM2_CRUMB or
SM2_SIBLING
Group2 are optional
Hans:
--- Quote ---do you have more Show_menu2-Call's in your template?
--- End quote ---
YES!
Didn't think about it. Will see and test, but I am confident that the errors are gone after that. Thank you!
Hans:
--- Quote from: Hans on February 13, 2017, 08:08:26 PM ---
--- Quote ---do you have more Show_menu2-Call's in your template?
--- End quote ---
YES!
Didn't think about it. Will see and test, but I am confident that the errors are gone after that. Thank you!
--- End quote ---
UPDATE: YES! Everything works without errors. Thanks again.
jacobi22:
(Y) (Y)
Navigation
[0] Message Index
[*] Previous page
Go to full version