Hi, I hope this is the correct place to ask my question.
How would you go about adding a sitemap; by this I mean adding a 'Sitemap' link to the left navigation, a 'Sitemap' link to the top navigation, both of which open to a page with links to every page of the website (a sitemap).
I tried a search on this site, but came back with no matches on similar subjects.
If anyone could help it would be appreciated.
Sample code of how the sitemap will look (will obviously be more complicated than this when more pages are added).
Code:
<h2>Site Map</h2>
<h4>Please use the site map below:</h4>
firstly, I'd create the sitemap as a module. That'll mean you can integrate it into your site easily.
The links will (pretty much) be modules.php?name=Module_Name
The Idiots Guide to Nuke has a basic introduction to Modules Creation in there, but just to make life simple, what I'd do is:
Create a file called index.php inside a new directory called Site_Map inside the Modules directory.
In that file, put this code:
Code:
<?php
if(!eregi("modules.php", $_SERVER['PHP_SELF'])){
die("You can't access this file directly...");
}
include("header.php");
if(!isset($mainfile)){
include("mainfile.php");
}
OpenTable();
?>
<html>
Add your html stuff here with the site link info in
</html>
<?php
CloseTable();
include("footer.php");
?>
AI
JenOcide Nuke Cadet
Joined: May 24, 2003
Posts: 3
Posted:
Sat May 24, 2003 2:05 pm
Thank you for the reply ArtificialIntel,
I'd started working on a module (as below) after reading the idiots guide, but wasn't sure if I was on the right lines or not (because I'm an idiot ).
After looking at your sample code, I think I'll quit working on mine and give yours a try instead
Thank you once again for your help, and I'll let you know if everything works out ok
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum