[htmltmpl] Feature Idea [TMPL_VIRTUAL]
Brought to you by:
samtregar
From: Jason P. <ja...@jo...> - 2007-04-03 02:10:26
|
How about a new tag, either as part of the standard distribution or a plugin: TMPL_VIRTUAL The one thing that I like when I'm doing PHP pages is that I can build singular dynamic components and simply include them from the parent template. i.e. # FILE: index.php <? virtual( 'helloworld.php' ); ?> # FILE: helloworld.php <? print "Hello World!"; ?> Yes, I know about Philipp's Widgets articles[1] on perl.com, but you still need to put the encapsulation logic in your code, which seems redundant. How about if the HTML_VIRTUAL called LWP to request the URL and replace the tag w/ the response's content? # FILE: index.TMPL <!-- TMPL_VIRTUAL URL="helloworld.php" --> # FILE: helloworld.php <? print "Hello World!"; ?> - Jason [1]: http://www.perl.com/pub/a/2007/02/02/htmltemplate-widgets.html |