[TYPO3-mvc] Comments in fluid templates

Laurent Foulloy yolf.typo3 at orange.fr
Sun Jan 10 14:10:30 CET 2010


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 '';
     }
  }

It would be fine to have something like this in the standard distribution.

Thanks again for your help.


Laurent Foulloy a écrit :
> Hi,
> 
> Thanks for the answers.
> 
> Best regards
> 
> Laurent
> 
> Sebastian Kurfürst a écrit :
>> Hi,
>>> Technically or conceptually? You could create a view helper that 
>>> always returns an empty string.
>>> That would solve the issue technically.
>> Exactly, that's what I'd suggest as well. We should maybe add such a VH
>> to the standard distribution.
>>
>> Greets,
>> Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list