One Vertical Menu - Multiple Pages.

  • jem
  • Born
  • Born
  • jem
  • Posts: 1

Post 3+ Months Ago

I am fairly new to web design & programming.
My question is I need a menu for all my pages. I am constantly changing my menu items and am looking for a way to create one menu and then link to it from each page so if I update the menu it then updates all pages.
I have tried it with Dreamweaver and Spry but creating a template or similar does not include the CSS.

Is there a way to create a single menu and link to it from all pages.

Thanks

Jem
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

PHP Include
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

or, you could use apache's include (or your server doesn't have php installed):
Service Side Includes

or, if you're on an iis server that supports asp:
ASP Includes
  • zaiah
  • Proficient
  • Proficient
  • zaiah
  • Posts: 375

Post 3+ Months Ago

I'm a little confused. Because I had the same issue. But I found in Dreamweaver that you can save the menu as a "library item". Then each time you need to edit, open the library item, make your changes, it will ask if you want to update all pages and say yes. And you should be in good shape. Set the rules with your CSS and you should be good to go. I don't have my super computer with DW in front of me. But I have done this, so I know it works.


Let me point out that I am new to this as well. So the solutions suggested are probably much better. I just don't know any PHP or ASP. Haven't gotten that far yet.
  • ACT Media
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8
  • Loc: India

Post 3+ Months Ago

Hi, :D

All websites have areas that are repeated in many pages of the same site, for example : Header banner, navigation menu's, footers, etc. When you wanted to make changes often, in dreamweaver for these common area's you can use a feature called as Library.
When you have marked a particular area as library and when you make changes in the library, the changes will appear wherever you have inserted the Library Item.
Library will be the apt solution for your question.
All The Best !!!
  • murcielagossi
  • Proficient
  • Proficient
  • User avatar
  • Posts: 457

Post 3+ Months Ago

PHP includes make life so much easier. But to test stuff you must either have a local test server (with PHP installed) or upload to see your changes.
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

If you can learn how to use php includes it will make life soo much easier for you. Here is an easy 'how to do it' for those who don't already know.

If you want to call your files filename.html instead of filename.php you will need to create a .htaccess file which contains the following:

Code: [ Select ]
AddType application/x-httpd-php .html


This file will be placed in the main directory of your website.


Create a folder on your website server and call it includes

Create the file called menu.inc (or whatever filename.inc you want) and save it within that folder. In this file you put all your code for your menu (or footer), you don't need to start it with any <html><head> etc tags. Just use the code you would normally need eg: start with your table where the menu/footer will sit.

In your main html page (eg index.html or index.php) where you want the menu to be included you type the following code:

Code: [ Select ]
<?php include("includes/header.inc") ?>



If for some reason it gets this wrong, check your .htaccess file and check that the server allows you to use .htaccess


The great thing about using php includes is that when someone looks at your source code, it will appear seamless. It also makes updating larger sites a whole lot easier. I would recommend anyone use this method for the header and footer of a website. :thumbsup:
  • Fabinator
  • Proficient
  • Proficient
  • Fabinator
  • Posts: 467

Post 3+ Months Ago

If you want to test it on your own computer, you must install PHP, Apache etc. One very easy all-in-one install pack is Foxserv: http://sourceforge.net/projects/foxserv/
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6241
  • Loc: Seattle, WA

Post 3+ Months Ago

Another simple test server package, which I use: WAMP
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

yes I use wamp too, very good.
  • kitcorsa
  • Graduate
  • Graduate
  • kitcorsa
  • Posts: 132

Post 3+ Months Ago

just create you nav bar in a seporate txt or html or php or inc file and save in a folder on your server then inclde that in the section you want it on you site.

like
Code: [ Select ]
<html>
<head>
</head>
<body>

<?php include("includes/header.inc") ?>

</body>
</html>
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <?php include("includes/header.inc") ?>
  6. </body>
  7. </html>


then you have have that the same on all your pages on your site. now if you change the header.inc file the whole site changes automatically.
  • kitcorsa
  • Graduate
  • Graduate
  • kitcorsa
  • Posts: 132

Post 3+ Months Ago

i use WAMP it is great for testing site before uploading and making it live!

Post Information

  • Total Posts in this topic: 12 posts
  • Users browsing this forum: No registered users and 35 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.