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

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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