Search code examples
htmlcssdreamweaverspry

Using spry menu to create master page


Dreamweaver has spry menu function which lets user creating navigation bar quickly. Suppose I have multiple pages in a web site, the navigation bar are all same. Can we borrow the concept of master page from asp.net? I mean that to create master page by using spry menu?

Thanks


Solution

  • With pure html/css ... No you can't.

    With the use of PHP, ASP, or a similar server side technology you could.


    On second thought maybe you could use AJAX to load the menu in with the jQuery library.

    http://api.jquery.com/load/

    $('#menu').load('menu.html');
    

    So add jQuery to your web page. Then add the script above and where currently have the Spry menu put...

    <div id="menu"></div>
    

    Put the code for the menu you just removed into a file called menu.html.