Jump to content

Menus?


mcc_22ri

Recommended Posts

Right now I'm feeling like a little baby novice asking a ridiculiously simple question but I just can't find a solution to it! So here it goes.... please don't laugh!!!

 

How do I create a menu which doesn't have to be changed on every existing page whenever I need to add a new page? See... novice stuff and I know it can be done in Dreamweaver. I have Dreamweaver software (old version) but how would I write the code to do so ?

 

Thank you everyone.

Link to comment
Share on other sites

Well if you are asking this question I am going to assume that you do not have a very much experience with php. What you can do is create and "include" that will allow you to have it in one page where you can edit it and it will update on all of the other pages. Here is an example:

 

menu.php

<a href="something.php">Something</a>
<a href="something_else.php">Something Else</a>

 

home.php

<div>Some Data Here</div>
<?php include('menu.php'); ?>
<div>Other Data Here</div>

 

other.php

<div>Some Data Here</div>
<?php include('menu.php'); ?>
<div>Other Data Here</div>

 

Then you only have to update menu.php whenever you need it changed on all of those pages. Hopefully that will make sense to you. Also in order to do this you will need php on your server.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.