[TYPO3-dev] cObjGet

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Mar 27 16:50:20 CEST 2006


Christian Welzel schrieb am 27.03.2006 16:24:

>   $markerArray['###IMAGE###'] =
> $this->lcObj->cObjGet($this->conf['image.']);
>   $markerArray['###TITLE###'] =
> $this->lcObj->cObjGet($this->conf['image_title.']);

cObjGet is not what you want, but works in your case. From the inline-doc:

'Rendering of a "numerical array" of cObjects from TypoScript'. You have:

>     image = COA
>     image {
>         10 = IMAGE
>         10.file {
>             import = uploads/tx_sngallery
>             import.field = media
>             import.listNum = 0
>         }
>     }

which is not a "numerical array", but a single cObject (COA). So what
you need is:

$this->lcObj->cObjGetSingle($this->conf['image'], $this->conf['image.']);

First parameter is the cObject type ("COA" in your case) and the second
one is the configuration (from COA-cObject, an numerical array of other
content objects.

> plugin.tx_sngallery_pi1 {
>     image = COA
>     image {
>         10 = IMAGE
>         10.file {
>             import = uploads/tx_sngallery
>             import.field = media
>             import.listNum = 0
>         }
>     }
> 
>     image_title = COA
>     image_title {
>         10 = TEXT
>         10.value.field = title
>     }
> }

Either "value" or "field", not both. So try:

     image_title = COA
     image_title {
         10 = TEXT
         10.field = title
     }

Cheers,
Ernesto




More information about the TYPO3-dev mailing list