And how do I do it? I am working on a website which I need to have a menu. I really dont want to update every html page for each time I update or change the menu. Is there a way I can change the menu once and have that be reflected on all of the pages which have that menu? In the past I used frames but would like to use something more efficient. I only know html and use dreamweaver. Gosh, I hope this question isnt too "beginner" for this board. Thanks in advance for your help
You can use the <iframe> tag and just have your menu on a single .html page. If you want to go more advanced, you can use the include tag in php (which is more common), but you would have to learn basic php programming to do it. It's worth it in the long run.
I agree with instant87. You should learn PHP and you will be able to do menu inclusions and many other things. Anyway, you will sooner or later have to learn PHP. The sooner, the better.
Agree with the other replies that a php include is the way to go. Really simple once you've got the hang of it and quick to amend multiple pages.
Is there a good resource for learning PHP which one of you could recommend? Perhaps a beginners book(PHP For dummies?) or website would be very helpful. Thanks again, this is a huge help.
When someone's visiting the PHP file, it will be compiled into HTML from the server side. So it's not PHP's fault if you got something shitty with SEO.
Everything that PHP does happens on the server, so by the time it gets to the spiders, bots, and end users, it may as well be a static page that you've typed out yourself. If YOU write your PHP to output SEO'd content, then that's what everyone will see. As everyone else had said, PHP include is the way to go for your menus. http://www.php.net/function.include The online PHP manual is a great place to start learning about PHP. It looks intimidating at first (and it is!), but once it "clicks", then you'll be hooked. http://www.php.net/manual/en/index.php You can learn PHP on your own computer by installing Apache/PHP locally using something like XAMPP. PHP is worth every second you spend learning about it
In Dreamweaver, they have what they call Library items. You code the Library item and then apply it to each page. If you need to make a change, update the library item and when you save it, DW prompts 'update all pages', click yes and you're done! Depending on your site, you may not need to go down the track of PHP, etc.
Put your menu code in a separate file called 'menu.php' or whatever. Then where the menu is supposed to appear in your pages put in: <?php include("menu.php"); ?> Make sure each page is renamed to page.php and not page.html. It's as simple as that.
The throbbing brain that is DP forums has once again helped immensely. Thank you all for the insight. Cheers!
Thanks again everyone for the great responses. I tried to get this and I am hung up on one thing. When I insert the php code: <?php include("menu.php"); ?> it destroys my layout. Currently I use tables to organize the page but when the PHP menu is put in, the tables go away and are replaced by the new PHP menu file and only a bit of unformatted text from that page. Why might this be? I cant find the answer anywhere so it must be so easy that no one had to ask it online. Thanks in advance.
If you manually copy and paste the code from menu.php into your page (replacing your current php includes line), is it still broken?
Yes, when I either type or paste that code into my new .php page it is not showing correctly. "menu.php" file does show up correctly, but it destroys my current layout and actually removes most of the content on that page. When I place the php code outside of the main table it does show up however. Does PHP not work well with tables? I hate to say it but I am rather new to this. I hear tables are a hassle but that is the best way I have found to lay out my content. Thanks in advance
Alright, I got it working now. Wow, this totally rocks and will certainly save me time. Thanks again to all for your help along the way.