Dynamic Sitemaps
Tom Zito
ITS Knowledge Management
What are Dynamic Sitemaps?
- Dynamically generated lists of all the files in your site?
- Fancy DHTML "AJAX" menus?
- Googlewhacking will tell you both, so..
- I'll demo both here..
[any material that should appear in print but not on the slide]
Generating a sitemap
no handout
Cool things about this script
- Can configure it to exclude directories
- Need to explicitly include filetypes (php, html, jpg)
- Can explicitly exclude any files.
[any material that should appear in print but not on the slide]
Problems with this script
- Tabular layout with images.
- Directory tree structure unmodifiable.
- Uses image-icons - have to make new images for filetypes.
- Just ugly, so I decided to hack it.
[any material that should appear in print but not on the slide]
What did I do?
- Split it into 2 files config.inc.php and sitemap-lists.php
- Rewrote the logic to output directories/files as nested UL LI combos.
- e.g. sitemap text
- Why? Now we have a true structural layout that we can play with and configure easily.
Split the script to make it easier to separate the configuration from the script itself.
Splitting apart Content and Display
[any material that should appear in print but not on the slide]
Making it into menus
[any material that should appear in print but not on the slide]
Integration with my homepage
[any material that should appear in print but not on the slide]
Finally
- Limitations of this implementation - can configure only a directory name, not path.
- Should grab the <title> element out of the html files and use that for the link instead of the file name.
- CSS only degrades gracefully but because of IE6 limited CSS selector support does not give you submenus
- Should have some metadata in directories (like an info.txt file) that the script reads
- "The greatest failures in our study came from site maps that attempted to
lure the user into a dynamically twisting and expanding view, rather than
presenting a simple, static representation of the information
architecture... A site map should not be a navigational challenge of its
own. It should be a map... Site maps should be simple, compact layouts of
links, and they should show everything in a single view."
http://www.useit.com/alertbox/20020106.html
[any material that should appear in print but not on the slide]