Feature Idea [TMPL_VIRTUAL]
Jason Purdy <[email protected]> Mon, 02 Apr 2007 22:10:30 -0400
| Newsgroups | gmane.comp.lang.perl.modules.html-template |
|---|---|
| Organization | Journalistic, Inc. |
| Message-ID | <[email protected]> |
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 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV