[TYPO3-mvc] Re: CDATAViewHelper
Nils Blattner
nb at cabag.ch
Fri Feb 19 10:21:56 CET 2010
This baby is in my opinion a must have for fluid!
I tried to put some CDATA tags directly in the template, but they got
removed, so I made this (retardedly simple) ViewHelper to compensate...
<?php
/* *
* This script is part of the TYPO3 project - inspiring people to share! *
* *
* TYPO3 is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License version 2 as published by *
* the Free Software Foundation. *
* *
* This script is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
* Public License for more details. *
*
*/
/**
* @package Fluid
* @subpackage ViewHelpers
* @version $Id: CropViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
*/
/**
* Use this Helper if you need to print <![CDATA[ ]].
*
* @version $Id:$
* @license http://opensource.org/licenses/gpl-license.php GNU Public
License, version 2
* @scope prototype
*/
class Tx_CabagSteps_ViewHelpers_CdataViewHelper extends
Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
/**
* Render the CDATA content.
*
* @return string CDATA comment
* @author Nils Blattner <nb at cabag.ch>
*/
public function render() {
return '<![CDATA[' . $this->renderChildren() . ']]>';
}
}
?>
More information about the TYPO3-project-typo3v4mvc
mailing list