homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

Dynamically Generating Site Maps
Easy way of doing a site map page.

 10:26 pm on Nov 26, 2003 (gmt 0)

Hello all,

Was wondering if there is an easy way to dynamically update a site map page. That is the page knows when there are pages that have been added or removed and updates the site map page accordingly.

Currently the site I am working on has a site map that is updated manually.

Thanks for any help



 10:32 pm on Nov 26, 2003 (gmt 0)

sorry DFrag, no answer from me but I'm really interested in this too.

Sounds good in theory, though might be subject to problems with sites that grow huge and create extremely large site map pages.

having said that i wonder if a horizontal scrolling site map page might be both interesting and workable?

*goes right off on a tangent*


 10:33 pm on Nov 26, 2003 (gmt 0)

oh, and welcome to the forums :-)


 10:55 pm on Nov 26, 2003 (gmt 0)

A free search service I use (freefind) also builds a site map. You can choose the depth and other settings... if you pay you can get rid of ads too.

Neat feature, you can up your own template and it'll fit right in with your site.

I'm sure other site search systems might offer this, but this is one I've tried.



 10:56 pm on Nov 26, 2003 (gmt 0)

One way is to use a server side script to spider your webroot, parsing out the page titles and constructing links. Its a bit of work to get it to include/exclude the pages/folders you require.

I use one written in asp, & run whenever I add any pages, then save the output as html and upload it. This gives the option to modify the kw density first.



 4:35 am on Nov 27, 2003 (gmt 0)

I was looking at doing the same thing in PHP. Only problem is getting the page title as opposed to the file name. How are you doing this in ASP?


 6:18 pm on Nov 27, 2003 (gmt 0)

Using the filsystem object, grab the file contents into a string, then use string functions mid/left/right/instr to parse out the text between the title tags.

The code is not pretty and when I have spare time Im gonna rewrite using a regex.

Another way I have used is simply to have a file naming convention - read the file names, trim of anything after and including the "." then replace '-' with spaces.


 5:02 pm on Nov 28, 2003 (gmt 0)

> I was looking at doing the same thing in PHP. Only problem is getting
> the page title as opposed to the file name. How are you doing this in
> ASP?

I've written a script in Perl to do this, doing it in PHP would be similar.

I use the page title as the link text, you can get the title text with a simple regular expression.

As "aspdaddy" mentioned, you need to be able to exclude specified files & folders. I just created an array of items to exclude & checked against that array before processing each file.

I hope this helps,


Zaphod Beeblebrox

 3:07 pm on Nov 29, 2003 (gmt 0)

I wrote one in ASP. It's a little crude, but you can at least control what's being mapped and what's not. It also supports multiple languages, a maximum level of searching the tree, avoiding recursion, and excluding certain pages.

Check it out on my Webdesign page. You can find my link in my profile.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved