Re: Template Sigma: 2 issues

From: Date: Tue, 02 Aug 2005 20:18:37 +0000
Subject: Re: Template Sigma: 2 issues
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20237@lists.php.net to get a copy of this message
Hi, Markus Ernst wrote:
1. Template caching strips whitespace out of output. When working without template caching, this part of a template: ... When working with cached templates the output will be changed to: <a href="page1.html"><img src="thumb1.jpg"></a><a href="page2.html"><img src="thumb2.jpg"></a> which is definitely not the same, as lines of inline elements will not be wrapped. Is this a bug? I don't mind if whitespace is stripped, but a line break or at least one space should be there.
Well, you can switch off whitespace removal by doing $tpl->setOption('trim_on_save', false); http://pear.php.net/manual/en/package.html.html-template-sigma.html-template-sigma.setoption.php Though you may be right and the regexes which strip the whitespace are indeed a bit overzealous.
2. Replaced blocks are not displayed unless a variable is set. I assume this is an expected behaviour; anyway it would be nice to have a method for replacing a block with text that does not have to be parsed.
I suspect you are looking for this: http://pear.php.net/manual/en/package.html.html-template-sigma.html-template-sigma.touchblock.php

« previous php.pear.general (#20237) next »