[Templates] stonehenge.com cutting over to Template from Mason
Randal L. Schwartz
merlyn@stonehenge.com
05 Mar 2002 12:06:42 -0800
I've long been wanting to get out of Mason and into Template for
www.stonehenge.com. My current hosting solution is showing signs of
final fatality, so I've signed up for a nice box from sprocketdata.com
(who have been wonderful to work with so far, by the way). Since I'm
moving to a new place, I figured I'd use this chance to get everything
rehacked in Template as I wish now.
I think I like Splash for a library of nice HTML widgets, but I'm
struggling. I can't seem to get a splash/menubar to go 100% of the
width. It's really odd. A simple
<table width='100%'><tr><td bgcolor=green>foo</td></tr></table>
does the right thing. Why doesn't a menubar?
Also, how best to represent and trigger the hierarchy of links for my
top menu? I've got a hierarchy like
top = stonehenge merlyn
stonehenge = home perltraining
perltraining = home courses instructors prices (etc)
merlyn = home cutestuff columns books
columns = home wt ur lm
ur = home 01 02 03 04 05 (etc)
wt = home 01 02 03 04 05 (etc)
lm = home 01 02 03 04 05 (etc)
where each of these has a URL behind it.
So how do I detect which URL maps to which link in this map, and
then fire that bar and everything up the chain? I can think of
some slow ways to do it. :) For example, if someone is at wt/03, I want
to show:
top = stonehenge [merlyn]
merlyn = home cutestuff [columns] books
columns = home [wt] ur lm
wt = home 01 02 [03] 04 05
where [] means the item is selected. On my first cut, I'm using
metadata to select the row (wt) and item (03), and that pulls in
the menubar for wt, which then processes the menubar for columns,
being very careful to select wt. And that in turn processes the menubar
for merlyn, being very careful to select columns. The nightmare
is that I'm spelling out "columns" in about five places. Ick. If I
ever want to change that button text, I'm hosed.
What I'd like to do is find my place in the tree based on the URL,
with some fallbacks if it doesn't exist, and then wander up the tree.
I can't think of anyway to do this quickly with TT directives, so
maybe I'm gonna have to go back to a plugin to hand the right data
out. Am I missing something?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!