[TYPO3-mvc] Object has a title property but it doesn't show in the frontend

Stephen Bungert stephen at bungert.co.uk
Sat Jul 17 20:25:02 CEST 2010


Here is my fluid template:

<p>Gamebook List (Default Template)</p>
<f:if condition="{books}">
	<f:then>
	<ul>
		<f:for each="{books}" as="book">
			<f:debug title="Debug of MyArray">{book}</f:debug>
			<li class="book{book.uid}">
				<h2 class="title">{book.title}</h2>
				<div class="description">{book.description}</div>
			</li>
		</f:for>
	</ul>
	</f:then>
	<f:else>
	<p>There are no gamebooks.</p>
	</f:else>
</f:if>


The debug of my object (there is only one at the moment shows:

Tx_Gamebook_Domain_Model_Book Object
(
     [title:protected] => Book1
     [description:protected] => Book description.
     [image:protected] =>
     [playcount:protected] =>
     [start_section:protected] =>
     [attr1:protected] =>
     [attr2:protected] =>
     [attr3:protected] =>
     [attr4:protected] =>
     [genre:protected] =>
     [series:protected] =>
     [_cleanProperties:Tx_Extbase_DomainObject_AbstractEntity:private] 
=> Array
         (
             [title] => Book1
             [description] => Book description.
             [image] =>
             [playcount] =>
             [start_section] =>
             [attr1] =>
             [attr2] =>
             [attr3] =>
             [attr4] =>
             [genre] =>
             [series] =>
             [uid] => 1
         )

     [uid:protected] => 1
     [_localizedUid:protected] => 1
     [_languageUid:protected] => 0
     [_isClone:Tx_Extbase_DomainObject_AbstractDomainObject:private] =>
)

But the h2 tag in my template is empty, the description shows up however.

Is there something wrong with my template that I can't see? Why would 
description output something but not title? There is a title.



More information about the TYPO3-project-typo3v4mvc mailing list