Posted by Mauricio Araya V. on 05/12/05 18:42
Hello there!
This is an auto-answer just to say that I found my error.
This is the fix:
class myClass extends Smarty {
....
public function beautifyCode ($code){
$beauty = new XML_Beautifier( );
$beautycode = $beauty->formatString($code);
if (is_object($beautycode)){
return $code;
}else{
return $beautycode;
}
}
...
public function publishContent ( ){
$this->register_outputfilter(array(&$this, "beautifyCode"));
$this->display($this->template_file);
}
...
}
The problem occurred just because of a mistake in the template. I
didn't close the "head" tag resulting in a malformed XML, so return
$beauty->formatString($code); was returning an object.
Thanks anyways,
-Mauricio
Navigation:
[Reply to this message]
|