View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Link CSS menu code to other pages

Thread began 11/02/2009 12:56 pm by dconnerusa | Last modified 11/03/2009 6:28 am by dconnerusa | 1091 views | 5 replies

Jimmy Wu

One way you can add your menus to all your pages is to save the menu you created as a preset and then apply that preset to the pages in the location you want.

If you are using PHP, another way is to copy the require once for the menu that looks like this:
<?php require_once("CSSMenuWriter/cssmw/menu.php"); ?>

and put this in the body where you want the menu to show up.

Also copy the code that includes the css and scripts that should look like this:
<script type="text/javascript" src="CSSMenuWriter/cssmw/menu.js"></script>
<style type="text/css" media="all">
<!--
@import url("CSSMenuWriter/cssmw/menu.css");
-->
</style>
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("CSSMenuWriter/cssmw/menu_ie.css");
</style>

<![endif]-->

Make sure to change the paths if the other file is not in the same directory as the first one.

If you are using non-php pages, you will have to copy the entire menu structure to the second page in addition to the css files and scripts. The menu structure should be similar to this:
<ul class="level-0" id="cssmw0">
<li class="parent"><a href="#">Item 1</a>
<ul class="level-1">
<li><a href="#">Sub Item 1</a></li>
<li><a href="#">Sub Item 2</a></li>
<li><a href="#">Sub Item 3</a></li>
</ul>
</li>
<li><a href="#">Item 2</a></li>
<li><a href="#">Item 3</a></li>
</ul>
<script type="text/javascript">if(window.attachEvent) { window.attachEvent("onload", function() { cssmw0.intializeMenu('cssmw0',{select_current: 0, orientation: 1}); }); } else if(window.addEventListener) { window.addEventListener("load", function() { cssmw0.intializeMenu('cssmw0',{select_current: 0, orientation: 1}); }, true); }</script>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...