Hi, I have a css drop down menu designed but I don't want to copy and paste its code into every page on the website because if I make a change to the menu I will have to go back and re-write those changes by hand. I want to do it so like stylesheets... I know a bit about stylesheets but I have no clue as to putting the code for a menu in one. Help please! thanks. magda
Google "server side includes". There is a standard syntax for servers, and most, if not all, server side scripting languages include some include method. Search your favorite language's manual. cheers, gary
use header and footer and put code in them that repeats throughout pages for example in php <?php include 'header.php'; ?> puts in header.php contents on your page so you can have a simple structure <?php include 'header.php'; ?> body of the page currently on <?php include 'footer.php'; ?>
If your server doesn't support PHP or ASP, some websites editors (such as Dreamweaver) have a template feature that will update every page automatically.
SSI's are incredibly useful, but I imagine this isn't exactly what you're asking for. You need to put this at the head of every page: Replacing STYLESHEET with the filename of your stylesheet. Then all you will have to do is edit the stylesheet to alter the styles across your whole website.
No. The stylesheet is for presentation, not for content or markup. Includes are what you need. The include file is a simple snippet of the code that the server or the server side scripting language sticks into your page, kinda like a copy/paste thing. cheers, gary
Thank you so much, I am looking into that now. And thank you to Gary. That is what I had assumed but wanted a more refined reassurance. magda
I recommend php includes...they are really the easiest to implement...but the webpages have to be php pages.
Even though this is an old thread, there's no need to Google server-side includes. I already have a post on this subject (which also covers PHP) right here on DigitalPoint: http://forums.digitalpoint.com/showthread.php?p=2145250#post2145250
I would also go this route. They are easier and more reliable than dwts, bots or server side includes.