I'm sitting and making my website, but I'm wondering what alternative there is to an iframe... I need it because every time I change the links I want them to change all over my website. It's because I've heard that google does not crawl iframes and the internal links do not count then.
I used php includes to do this, and it's very easy. simply put all your links into a file called sidebar.php or menu.php (really what ever you want). it will look something like this: <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> </ul> HTML: then on your pages where you want to include the menu put in this line of code: <?php include("sidebar.php"); ?> PHP: your server has to support php and your pages need to have a .php extension for this to work. If you have any questions or need some help, let me know
You can use HTML server sided includes. Or alternatively, you can use PHP, which you must install and configure with your server (or make sure your host supports). It's pretty easy. All you have to do is, put this line of code in to include a file's contents into the page. <?php include("yourfilename.php"); ?> Code (markup):
Thank you for your help. I tried the PHP way but failed. I guess I'm just not really made for that lol. Could one of you maybe be extremely nice and make a quick sample of two files one PHP file with 2 links and the other file that imports it and then maybe send it to me? Thank you
Like EatingEmoKids sayed, include your menu.php in page where want to see your menu. Of course, that page must be .php too. Simple your .htm page where include menu.php save as .php and that's it. Sample: <html> <head></head> <body> .. content.. <?php include 'menu.php'; ?> .. content... </body> </html> You can put <?php include 'menu.php'; ?> almost on every places in body of page, but is good practise to put between <div></div> and stylish menu within css...
Could you please try and do this for me? It doesn't need to be more than two files, one blank page where two links are imported? Thank you
me and infoman66 both included the code to do this in our posts. If you cant follow the instructions hit me up on skype and I'll walk you through it. skype: eatinemokids
Well th0m4 I think about this: your page save as index.php <html> <head> <title>Some title</title> <style type="text/css"> <!-- #container {} /* put your style between {}*/ #top {} #topmenu {} #content {} #footer {} ul #menu {} --> </style> </head> <body> <div id="container"> <div id="top"> Top of the page </div> <div id="topmenu"> <?php include 'menu.php'; ?> </div> <div id="content"> Content goes here </div> <div id="footer"> Bottom of the page </div> </div> </body> </html> Code (markup): And your menu page such as menu.php <ul id="menu"> <li><a href="index.php">Home</a></li> <li><a href="some-page1.php">Link 1</a></li> <li><a href="some-page2.php">Link 2</a></li> </ul> Code (markup): Save your index.php page like some-page1.php and some-page2.php modify contet and thats it... Simple isn't it?