[TYPO3-english] Image URL rendering - TypoScript

Christian Hennecke christian.hennecke at wunderknaben.com
Fri Apr 27 17:06:22 CEST 2012


Am 26.04.2012 14:39, schrieb Tomas Norre Mikkelsen:
> Hi,
>
> I need to render a image-url for Opengraph, via TypoScript.
>
> I have something, like this in mind:
>
> temp.right_content = CONTENT
> temp.right_content {
>
> table=tt_content
> wrap=|
> select{
> max=1
> selectFields = image
> orderBy = sorting
>
> where = colPos = 0
> }
> renderObj=COA
> renderObj{
> 5=IMAGE
> 5{
>
> required = 1
> wrap = |
> file.import = uploads/pics/
> file.import.field = image
> file.width = 100
> file.height = 100
> }
> }
> }
>
> page.1 = IMAGE
> page.1 < temp.right_content
>
> ---
>
> I know it isn't right but my thoughts go this way at the moment, any
> hints on how to resolve my issue ?

- Extend select with a where statement that looks for tt_content 
elements with an image field that is not NULL.

- Use IMG_RESOURCE instead of IMAGE to get the relative URL only and 
wrap the Open Graph meta tag around it.

- Add the result to page.headerData.

Cheers,

Christian


More information about the TYPO3-english mailing list