|Keep It Simple, Stupid|
Building html site mapsby wfsp (Abbot)
|on Jan 30, 2005 at 13:38 UTC||Need Help??|
wfsp has asked for the
wisdom of the Perl Monks concerning the following question:
I have an alphabetical site map divided into 26 pages.
Each page has a letter menu with links to the other pages.
Each page has a subject menu with links to bookmarks of the subjects on that page.
Each subject is followed by links (one per line) to all the articles on that subject.
The information for each article is held in a tab delimited flat file database (currently 1,300 records, 135KB, example record below). The database is loaded into a hash and traversed as shown in the pseudo code.
The resulting page looks like the pseudo page below.
It is a static web site updated up to 4 times a day. Rebuilding all the site maps every time is easier, in my opinion than trying to update them.
As it stands the body html is built tag by tag and then loaded into a template.
I have looked at HTML::Template and believe that although it could be used I'm afraid it would be very difficult to maintain.
How would other monks approach this task?
Updated: clarified pseudo code