Web Hosting Talk







View Full Version : Menu issues


hsvchris
10-08-2003, 07:46 AM
I have just created a Website from a set template, this template has a side menu on it with links, it also has on it a latest news section. This is all good editing as one page site, but what we are talking about a 20 page site.

My question is: Is there a way I can link the menu and latest news section to a parent index so I don't have to change everypage seperately when the news and menu changs.

Thanks

1AsianChic
10-08-2003, 04:27 PM
yes, you can use SSI for php

etogre
10-08-2003, 06:33 PM
An example of a SSI in PHP.
<?php
$title = "Index";
@require_once('includes/header.php');
?>
Now we put our contents in here!!
<?php
@require_once('includes/footer.php');
?>

Then in header we could add

<html>
<head>
<link rel="stylesheet" href="styles/main.css" />
<title>Site Name - <?php echo "$title"; ?></title>
</head>
<body>

Which would make a page that has a different title on each page given by the $title variable. Also, all you would need to do to change a layout or add a link to your pages would be to edit the footer and header includes.

Good Luck! :D