Hi, Id like to make a menu where i can just update one page and it does it site wide, like an iframe type thing.. But i tryed that and whenever people clicked it just opened up the link inside an iframe. Are there any other tactics? if so whats the code to do it? Thanks alot if you can help, Nick
Yeah, well the site is built in HTML. So i was thinking maybe ASP? or PHP? or Java? but i just dont know how to make one or a link to guide to learn.
if your using php then create two pages Your main page(s) and a navigation page containing all the links. Then in the main pages use <?php include "pathto/navigationpage.php"; ?> http://uk.php.net/manual/en/function.include.php
ahhhh ok.. So i can make a HTML page, but call it *.php and use that php code to link to it, so id have my page set up something like this <?php include "pathto/navigationpage.php"; ?> <?php include "pathto/mainpage.php"; ?> <?php include "pathto/footer.php"; ?>
You can also leave the page named .html and add a line to your .htaccess file to process the .html as php, which can be helpful if the page already exists and is indexed. AddType application/x-httpd-php .html Code (markup): will generally do it.
How much 'content' do you have? Is there any reason you don't want to 'port' it to a proper CMS (eg. Joomla)? That would take care of it all for you and then some.
The person who im making the website for doesnt want a CMS.. thats the first thing i suggested as it would make things x100 more easier, but they need support pages, and other stuff so CMS isnt right for them really, This is a commercial website for a print management solutions company. EDIT: one quick quesiton, how do i control the heghts and widths of the pages displayed?
Still need help, and i made a page like this.. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <?php include "pathto/header.php"; ?> <?php include "pathto/home.php"; ?> <?php include "pathto/footer.php"; ?> <body> </body> </html> But that didnt work..
You have to put the php includes where you want the actual content of the include to show up, as in inside the <body> tags.
Like this? <?php include("header.php"); ?> <?php include("home.php"); ?> <?php include("footer.php"); ?>
No, I mean this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php include "pathto/header.php"; ?> <?php include "pathto/home.php"; ?> <?php include "pathto/footer.php"; ?> </body> </html> Code (markup): Remember the includes are going to build your normal html page. A regular page has the header, content and footer within the body tags, so that's where you put the includes. (I don't usually wrap the include code on multiple lines, if I don't have to.)
No problem. I ran into it a long time ago when I had a HUGE site that was all .html pages, but I wanted to convert it to using includes. The idea of changing the pages to .php and adding all those redirects to the .htaccess made my brain throb.