[TYPO3-mvc] Blog example: Number of comments
Julian Kleinhans
typo3 at kj187.de
Mon Jul 27 22:01:03 CEST 2009
Hi,
yeah.. here is my solution
viewHelper which returns only count($this->renderChildren());
Fluid syntax looks like:
<NAMESPACE:commentcount>{post.comments}</NAMESPACE:commentcount>
thx :)
cheers
julian kleinhans
Steffen Ritter schrieb:
> Julian Kleinhans schrieb:
>> Hi,
>>
>> next question :-)
>> Extension: blog_example
>>
>> The show.html display a single post with all comments.
>> Beside the comment headline i'll display the total number of comments
>>
>>> <h3>Comments (TOTAL_NUMBER_OF_COMMENTS)</h3>
>>> <f:for each="{post.comments}" as="comment">
>>
>> but i dont know how can i realize that...
>> Any hints ?
>>
>>
>> cheers
>> julian kleinhans
> Just implement a getter for commentCount ;)
> return count($this->comments)
More information about the TYPO3-project-typo3v4mvc
mailing list