typo3 fluid: set a link to media image


May 25, 2016 at 10:46
Typo3

Using f:image is not enough because if there is a link defined in the backend, like this:

bild

that link is, of course, ignored. Let's say I have an extbase entity named "course" and it has exactly 1 image named "image". If there is a link, I can access it via

{course.image.originalResource.link}

But using this wont suffice, because if a target is defined, it is no longer usable. That's why its advised to use fluids link.typolink, like this:

<f:link.typolink parameter="{course.image.originalResource.link}">
 <f:image image="{course.image}/>
</f:link.typolink>

and that works!


Tags: FAL image link target fluid


Hinterlasse einen Kommentar:
Search