[TYPO3] Third try: Print a list of image filenames to the page?

Christopher bedlamhotel at gmail.com
Sun Sep 24 23:02:21 CEST 2006


On 9/24/06, Mike <php at talkingspider.com> wrote:
> Your example renders the images.

You clearly didn't TRY the example then.

>I want to render the filenames of
> the images, comma separated, see original question.  Also, it looks
> like your content selection selects the entire column ("Normal")
> column, not just the images content item.

Aside from the fact that the example I posted was an EXAMPLE--you
don't have a field in tt_content named 'foo', do you?--the renderObj
is an HTML object, not an IMAGE object. It renders almost *precisely*
what you asked for, the two exceptions being that it also prepended
the list with a comma (this was because the values in the image field
are also stored as a comma-separated list--just delete the comma in
the .dataWrap part).

The reason you're getting rendered images is because you didn't
specify that you don't want the image content element to behave
normally. If that's what you need, you have two easy options (along
with several other possibilities):

1. explore the TS object browser (in the template module) and alter
the default rendering of tt_content.image--but be aware that the basic
TS for the image content element is reused elsewhere.

2. store all your image content elements in a non-rendered page column
(e.g. create a column named 'storage' or something and don't render it
in your template, just use it for this job)

As far as the example I posted selecting the entire column, I've
already posted links to all the relevant sections of the TSref in this
thread. The information about how to restrict your db query is waiting
there in the TSref for you to read it (hint: it's the 'WHERE' clause
in the .select part of the cobject).


More information about the TYPO3-english mailing list