Home | Forum | Unread | Sign in | Sign in
Wirebird
Forum

discussion > gamehawk > main

Developer discussion of the Gamehawk release of Wirebird. Here be Perl, SQL, REST, HTML, CSS, JavaScript, and other technical terms.
Subscribe | Unread | Recent | Group options | Topic options | Post
KarenCravens
Karen Cravens

Wed

Apr 23
2008

20:21



Wikify

Gamehawk - 23 Apr

After reading an article on reverse callback (a/k/a push style) templating on perl.com, I almost switched to Template::Recall. See, the current HTML::Templates have a lot of switch logic in them, more than I'd really like since I want non-programmers to be able to write them. In reality, I should probably be calling a bunch of template snippets instead of relying on tmpl_loop and tmpl_if to arrange snippets of a monolithic template. Template::Recall is pretty darn good at this.
Problem is, there are cases I *want* to have some simple if/then logic: if a link doesn't exist, for instance, I want to leave the entire anchor statement out... but I don't want to be building the anchor statement in the Perl code, because it might involve classes and JavaScript and whatnot that shouldn't be embedded in code. There's no way in Template::Recall to do trivial things like this, as far as I can tell.
I should probably just break up my HTML::Templates into snippets, but I think I won't do it this release.
Subject (required)




 
Refresh