Hello my websites has 100+ html files and everytime I will modify my menu I need to do it manually. Is there a way to make it global so that I will just modify it in one file? Thanks
You can use php to 'include' your menu in every file. Where the menu would normally be on every page you just put: <?php include 'menu.php'; ?> And then create a menu.php file with the html for your menu in it. Then when you need to change your menu, you only need to change 1 file (menu.php). More reading... Since all your files are already .html, you'll need to rename them all to .php, and then look into using htaccess to make sure you don't lose your spidered links. This is much easier than it sounds - the nerds in the Apache forum on DP are very helpful Or you can try getting php to work in html files. More reading: http://forums.digitalpoint.com/showthread.php?t=5801
Yes PHP includes in the easiest way OR use dreamweaver templates (dwt). This will make it easy for you to make changes in menu.
Kerosene seems like it's not working here. I just wondering if I the code will work on a local machine or just on the host server? Here's the code that I made menu.php <body> <a href='Home.php'>Home</a> - <a href='AboutUs.php'>About Us</a> - <a href="links.php">Links</a> - <a href='Contact.php'>Contact Us</a> <br /> </body> </html> index.php <body> Index <br/> <?php include("menu.php"); ?> </body> </html> What do you think is the problem?
Buddy, php will work only if you run it own a php powered machine... I suggest you upload these files to your hosting server and they try to access the pages. Or if you need a local solution...go install WAMP from here http://www.wampserver.com/en/download.php And install it to your machine... After restart.... put your html/php files in www directory inside the WAMP folder .... Fire your browers and access those files or folder throught http://localhost Regards, Warren
WarMarks on what specific folder on the WAMP folder do I need to put the html/php files? Hmm can you be more specific on the "http://localhost" I cant find the exact directory. Thanks