[TYPO3-german] extbase CType im Model

Thomas P. mail at tomgrill.de
Tue Aug 7 11:38:13 CEST 2012


Model:
class Tx_xxxx_Domain_Model_Content extends 
Tx_Extbase_DomainObject_AbstractEntity {

     protected $CType;

     public function getCType() {
         return "test".$this->CType;
     }
     public function setCType($CType) {
         $this->CType = $CType;
     }
}


wenn ich im template {cmiddle.uid} bekomme ich die UID des elements 
(wird ja vererbt)
aber {cmiddle.CType} gibt nichts zurück.:

<f:for each="{singlenews.content}" as="cmiddle">
                 {cmiddle.uid}
                 {cmiddle.CType}
                 <f:cObject 
typoscriptObjectPath="plugin.tx_salnews.contentobject" data="{cmiddle}" />
</f:for>


Ziel soll es sein, dass das CObject nur angezeigt wird, wenn es vom 
CType text ist, aber bevor ich eine Condition machen kann muss ich 
erstmal den CType wissen :)

Gerne bin ich auch für andere/besser Lösung zu haben:)

Danke,
Tom


More information about the TYPO3-german mailing list