WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_DESCKEY, '<span class="stuff">[a][page_title][/a] (menu: [a][menu_title][/a])<br /><i>[description]</i><br />([keywords])</span>',"<ul class='sitemap'>",'</ul>','<li>','</li>',false,false);
echo <<<FOO<style type="text/css">div.left ul, div.left li, div.left span, div.left * { text-align: left !important;}ul.sitemap li { text-align: left; padding-top: 0.5em;}ul.sitemap .menu-current > span.stuff { display: block; background-color: #E0E0FF; border-right: 2px solid blue;}div.left { text-align: left !important; }</style><h1>Sitemap</h1><div class="left">FOO;show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_DESCKEY, '<span class="stuff">[a][page_title][/a] (menu: [a][menu_title][/a])<br /><i>[description]</i><br />([keywords])</span>',"<ul class='sitemap'>",'</ul>','<li>','</li>',false,false);echo "</div>";
Note that in my stuff the call to show_menu2 is all on one line.
show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_DESCKEY|SM2_MULTIMENU, ...
echo "<style> .rootnav span {border-left: solid 1px red; padding: 0 10px;} .rootnav span.first {border-left: none;} </style>"; show_menu2(0, SM2_ROOT, SM2_START, SM2_TRIM|SM2_DESCKEY|SM2_MULTIMENU|SM2_FIRSTLAST, '[a][menu_title][/a]',"<div class='rootnav'>",'</div>','<span>','</span>','',false);
... SM2_MULTIMENU: I don't see the use for this option. As far as I am concerned you just make multiple calls to show_menu2, once for each menu number that you want to display...@virgilwhy not just use multiple calls to show_menu2 as above?
Feel free to enlighten me...
Why are you not using the sitemap module? show_menu2 is designed to(wait for it) show menus. It is flexible enough to be able to abuse it and createsitemaps, but it isn't the main purpose of the function.
I know... but I am fund of the additional possibilities of the sitemap withdescription and keywords, what the original sitemap doesn't offer...
[PAGE_ID] - The page id of the specific page in the sitemap.[PARENT] - The parent of the page that is currently in the loop.[LINK] - The link to the specific page within the sitemap.[PAGE_TITLE] - The title of the page within the sitemap.[MENU_TITLE] - The title of the page as it is shown witin the menu.[DESCRIPTION] - The description of the page within the sitemap.[KEYWORDS] - The keywords that are given for the current page within the sitemap.[TARGET] - The target to which the page should be opened.[MODIFIED_WHEN] - The date when the page has been last modified.[MODIFIED_BY] - The person who made the last modification to the specific page.
I'm not actually stomping on $extra_where_sql, it is left as is in the original state or added to with the 'AND menu = $aMenu' part if required. So by default we get the 'AND menu = $aMenu' added however to select 'all menus' from a multimenu heirarchy I needed to remove the specific call the menu = $aMenu.
... NOT your show_menu2 Reason... I want to combine it with melissa's UDM4 capabilities, see...http://forum.WebsiteBaker.org/index.php/topic,2805.msg18740.html#msg18740
(from Matthias)"Sitemap v.2.8 supports the following informations wich you easily can use at the place you want.""I like the show_menu2 because it is fast (only on database request) and flexible for all things that are needed."(from Brodie)"If you do want to use it then do the same as above replacing show_menu with with show_menu2. To use sm2 with UDM see succhi's comment above.http://forum.WebsiteBaker.org/index.php/topic,2584.msg20067.html#msg20067"(from Succhi)"You're quite right about the whole sitemap thing. [...]"
show_menu2(3, SM2_ROOT, SM2_START, SM2_ALL, ' | <span><a href="[url]">[menu_title]</a></span>', '', '', '', '<span><a href="[url]">[menu_title]</a></span>', '');
// fix up the menu number to default to the menu number// of the current page if no menu has been suppliedif ($aMenu == 0) { $aMenu = $wb->page['menu'] == '' ? 1 : $wb->page['menu'];}
sm2_mark_children($rgParent, PAGE_ID, 1);
// mark all children of the current pageif (PAGE_ID != 0) { sm2_mark_children($rgParent, PAGE_ID, 1);}