Ask questions and get good answers on mb.jQuery.components

Greetings, my question is if the menu and submenus can call different templates and additionalData? As far as I know, they all call the same one defined as shown below:

... <table><tr>   <td class="vertMenu">
    <table class="rootVoices vertical" cellspacing='0' cellpadding='0' border='0'>
      <tr><td class="rootVoice {menu: 'menu_12'}" >ajax menu</td></tr>
    </table>   </td> </tr></table> <script type="text/javascript">   $(function(){
    $(".vertMenu").buildMenu(
    {
    template: "http://www.myserver.com/templates",
    additionalData: "templateID=1"
    }); }) </script> ...

I tried to add another attribute in the <a tag for submenus like this <a href="myurl" menu="SubMenu1_Id" overridetemplate="new_template_url">Sub Menu 1</a> and tried to modify the script but no luck so far,

Any help would be appreciated,

asked Mar 07 '11 at 11:01

mindbodyheart09's gravatar image

mindbodyheart09
213

closed Apr 06 '11 at 15:59

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

The question has been closed for the following reason "The question is answered, right answer was accepted" by Matteo Bicocchi Apr 06 '11 at 15:59


Hi, The idea is that you have one template that receive the ID of the menu you want to show in the page; you need to build your own logic inside the template that returns the right content based on the ID param recived.

Bye,

Matteo

answered Mar 13 '11 at 07:26

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Thanks Matteo. You are right. I built my own logic in the template.

answered Mar 24 '11 at 09:43

mindbodyheart09's gravatar image

mindbodyheart09
213

jQuery main site - Matteo Bicocchi