Don't ask to ask, just ask | |
PerlMonks |
Re: Re: rant on = qw(HTML::Mason Embperl Template etc) ;by kwoff (Friar) |
on Nov 10, 2001 at 05:56 UTC ( [id://124525]=note: print w/replies, xml ) | Need Help?? |
One thing I didn't like about HTML::Template (maybe I just didn't understand it enough to come up with a clean solution) was the following.
I wanted to give the HTML developers a set of variables that they could use. They could pick and choose which of the set they wanted to display. It was a snippet of HTML to display the current weather, so they could show "wind speed", "wind direction", "temperature", "humidity", and so on.... I did something like:
and the HTML developers would ideally be able to select from those variables and use them like this:
But actually what I had to do was put ALL the variables into the template, and hide them as a comment, otherwise I would get some error:
and I just find that extremely ugly. What's more, if your variables are within a TMPL_LOOP (which I also did a list of news headlines, so in fact I found myself in that situation), then you have to put that blob of commented-out TMPL_VARs inside that loop. Also I found that somehow this setup was confusing to the HTML designers, so I ended up having to edit the HTML anyway (maybe that's unique to my situation, though), thus smashing my dreams of never having to look at the HTML again.
In Section
Meditations
|
|