dreamweaver/training/in - templates

Forum home » Delegate support and help forum » Dreamweaver Training and help » dreamweaver/training/in - Templates

dreamweaver/training/in - Templates

resolvedResolved · Low Priority · Version Standard

Ashleigh has attended:
Dreamweaver 8 Intermediate course

Templates

Apart from using template how can I keep the same menu on every page?

RE: Templates

Hi Ashleigh,

You could use Dreamweaver Snippets or Library items. These are bits of mark-up code that can be included on each page. When you update a snippet or library item, Dreamweaver updates the same changes to all pages that contain the item.

Personally I like to use 'include files'. They work in a similar way, except it doesn't require the updating of all pages that require the standard code (eg. your menu).

To do this, create a new HTML document, but remove all the start tags such as <html> and <body>. Remove everything so it's a blank file.

Then type or paste the code you require in the file, and save it. You can choose any file type you like (usually it's .inc file) but I choose to use the same extension as the type of web document (eg. .html if a HTML file, or a .php file if a PHP file).

Then, whenever you want the menu or bit of include code to appear, you have this:
<!--#include file="mymenu.inc"-->

Which will display whatever HTML is written in the mymenu.inc file. This way, whenever you update, save and upload mymenu.inc, ALL the pages that include mymenu.inc will also be updated!

This is by far the best way to quickly do a global across your whole site in a matter of seconds!

You may need ASP installed to be able to do this.
Or if you have PHP installed you can include using include("filename");

Let me know how you go if you decide to try it.

Hope you enjoyed your Dreamweaver Intermediate course. We look forward to helping you with any future questions you may have in the next 12 months

Kind regards,
Rich

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Dreamweaver tip:

Css styles

If you are looking for a CSS style for your website / web page and not sure what you want to use, then go to the Csszengarden website, where you can download samples to try.

View all Dreamweaver hints and tips


Server loaded in 0.05 secs.