WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Argos on March 10, 2009, 12:57:31 PM

Title: Extended menu options ideas
Post by: Argos on March 10, 2009, 12:57:31 PM
Hi,

WB is not very well suited for creating extended menu types like discussed on http://www.smashingmagazine.com/2008/02/26/navigation-menus-trends-and-examples/ (see points 1 and 3 in particular). It would be cool if you would have fields for Menu Icon and Menu Text (or some other names) with each page entry, to add icons/pictures and extra info to the menu item.

I think it should be doable for a smart coder...  :-D
Title: Re: Extended menu options ideas
Post by: Stefek on March 10, 2009, 01:26:49 PM
Hello Jurgen.

Thats why I am asking so often to make it possible to add a FIELD into the "Modify Page Settings" called "tooltip" (you also may call it "subtitle").
With some changes to the SM2 Core it should be possible to integrate such a feature.

I really would love it.

Regards,
Stefek
Title: Re: Extended menu options ideas
Post by: Stefek on June 09, 2009, 01:30:45 PM
Hello Jurgen,
in the German subforum I started a discussion and I really hope that there will be changed something for more easy for the designers life.

What you are asking for, can also be achieved by a small workaround suggested by Aldus in this Post (german):
https://forum.WebsiteBaker.org/index.php/topic,10062.msg86144.html#msg86144

It has to be _hardcoded_ into the index.php of your Template.

Code: (ignore the first line) [Select]
<?php // ignore this line, please!

ob_start();
    
show_menu2();
    
$menu_str ob_get_contents();
ob_end_clean();

$suchmuster = array(&#39;Wohnen&#39;, &#39;Offene Stadtarbeit&#39;, &#39;Consors Betriebe&#39;);
$ersetzung = array (&#39;Wohnen<sup>Plus</sup>&#39;, &#39;Offene Stadtarbeit<sup>PSZ</sup>&#39;, &#39;Consors Betriebe<sup>WfBN</sup>&#39;);

echo str_replace($suchmuster$ersetzung$menu_str);

?>

In $ersetzung you are able to use HTML.
This snippet is limited (I am sure there are similar techniques, more extended, to achieve all you want with the menu), but it can be used for things you asked in your initial post.

It's -of course - only good if you have a fixed structure.

Kind Regards and Happy Backing.
Stefko


Title: Re: Extended menu options ideas
Post by: Argos on June 09, 2009, 03:52:41 PM
Hi Stefek,

that's clever, thanks. But I wonder what the advantage is of doing it this way. Why create a dynamic menu that still needs static, hardcoded html? Wouldn't it be easier to just create the static, hardcoded menu on its own? Now it's a hybrid between static hardcoded and dynamic backend stuff, which doesn't seem to have an advantage above a complete hardcoded version. Or do I miss something?
Title: Re: Extended menu options ideas
Post by: Stefek on June 15, 2009, 12:12:01 PM
Hi Stefek,

that's clever, thanks. But I wonder what the advantage is of doing it this way. Why create a dynamic menu that still needs static, hardcoded html? Wouldn't it be easier to just create the static, hardcoded menu on its own? Now it's a hybrid between static hardcoded and dynamic backend stuff, which doesn't seem to have an advantage above a complete hardcoded version. Or do I miss something?
Yes, you are right, Jurgen - that's why I started a thread in the german subforum regarding to this problem.
If you want such a thread in english, please start it - or let me know, I will give it a try (english is not that easy for me as german).

Kind regards,
Stefek