Output formatting in the presence of TMPL_IF
Offer Kaye <[email protected]> Tue, 1 Feb 2011 17:14:36 +0200
| Newsgroups | gmane.comp.lang.perl.modules.html-template |
|---|---|
| Message-ID | <[email protected]> |
Hi H::T users, If I have a section in my template file that looks like: <TMPL_IF NAME="foo"> content when foo is true </TMPL_IF> more content This section will be reduced (in the case of 'foo' being false) to an empty line followed by "more content" on the next line. As I'm using HTML::Template for non-HTML purposes I do care about final output formatting and the empty line is ugly. On the other hand trying to make sure I don't get an empty line leads to the following uglier solution: <TMPL_IF NAME="foo">content when foo is true\n</TMPL_IF>more content Is there any other solution? Best regards, Offer Kaye ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d