Forums / Developer / ezxmltext.tpl override for file generated by workflow

ezxmltext.tpl override for file generated by workflow

Author Message

Andrew Mullins

Monday 26 March 2007 9:37:19 am

I need to specify a template override for the content/datatype/view/ezxmltext.tpl, however, this template should only effect the output of a specific custom workflow extension. I am using the following code to specify an output template for a file that is generated by the workflow:

//specify the template
$vcalTpl =& templateInit();
$vcalTpl->setVariable('obj', $object);
$vcalContent =& $vcalTpl->fetch('design:vcal.tpl');

//write to file
eZFile::create($objectID.".vcs", $dir, $vcalContent);

This override works fine, however, there are a few fields I would like to output which are stored via the xml block datatype. I need to output plain text without the xhtml markup. I could use "strip tags" to handle this in php but would like to know if there is a way to use a template override, instead...

Thanks in advance,
Andy