TYPO3 6.0: Render images of current page from border column in FAL
Asked Answered
I

2

6

I've have the following snippets and I don't get it to work.

COL3 = FILES
COL3 {
        references {
            table = tt_content
            uid = 14
            fieldName = image
        }
        renderObj = TEXT
        renderObj {
            data = file:current:publicUrl
            wrap = <img src="|">
        }
}

Snippet works so far, but I want to use it with current page & colPos = 3. So something like:

table = tt_content
select {
  where = colPos = 3
  orderBy = sorting
  languageField = sys_language_uid
}

It feels like I've tried almost everything.

I really appreciate every help I can get...

Thank's alot!!

Interstate answered 11/3, 2013 at 21:39 Comment(0)
J
4

I presume the select attribute does not work with references.
Try this solution (not tested) to use with any content element.

...
references {
    table = tt_content
    uid.data = uid
    fieldName = image
}

Another idea:

COL3 = CONTENT
COL3 {
    table = tt_content
    select {
        where = colPos = 3
    }

    renderObj =  FILES
    renderObj {
            references {
                table = tt_content
                fieldName = image
            }
            renderObj = TEXT
            renderObj {
                data = file:current:publicUrl
                wrap = <img src="|">
            }
        }
    }
Jerri answered 12/3, 2013 at 0:6 Comment(2)
You saved my Day! Thank's alot. I dried the first one already which does not work for me - but the second one works out of the box! Thanks mate.Interstate
Great - I didn't test, which makes me even prouder :).Jerri
E
7

That's sounds better to me :

COL3 = CONTENT
COL3 {
    table = tt_content
    select {
        where = colPos = 3
    }

    renderObj =  FILES
    renderObj {
            references {
                table = tt_content
                fieldName = image
            }
            renderObj = IMAGE
            renderObj {
                file.import.data = file:current:publicUrl
            }
        }
    }
Empson answered 18/3, 2013 at 14:41 Comment(1)
This is indeed the better solution because it uses an IMAGE object for the picture.Boatwright
J
4

I presume the select attribute does not work with references.
Try this solution (not tested) to use with any content element.

...
references {
    table = tt_content
    uid.data = uid
    fieldName = image
}

Another idea:

COL3 = CONTENT
COL3 {
    table = tt_content
    select {
        where = colPos = 3
    }

    renderObj =  FILES
    renderObj {
            references {
                table = tt_content
                fieldName = image
            }
            renderObj = TEXT
            renderObj {
                data = file:current:publicUrl
                wrap = <img src="|">
            }
        }
    }
Jerri answered 12/3, 2013 at 0:6 Comment(2)
You saved my Day! Thank's alot. I dried the first one already which does not work for me - but the second one works out of the box! Thanks mate.Interstate
Great - I didn't test, which makes me even prouder :).Jerri

© 2022 - 2024 — McMap. All rights reserved.