[TYPO3-mvc] Comments in fluid templates

Martin Kutschker masi-no at spam-typo3.org
Sun Jan 10 14:57:15 CET 2010


Laurent Foulloy schrieb:
> Hi,
> 
> Very simple but quite useful CommentViewHelper, especially when using
> several nested <f:if>
> 
> /**
>  *
>  * @param boolean If true the comment should be displayed
>  * @return string Either the comment or a null string
>  */
>  public function render($show = NULL) {
>     if ($show) {
>       return $this->renderChildren();
>     } else {
>       return '';
>     }
>  }
> 

Show is for debugging purposes, right? Nice idea.

Note: I would use FALSE instead of NULL as the default value.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list