typo3 7: link image (if link is defined)

439 views Asked by At

I am trying to output an image assigned to an extbase entity named "course" in a fluid template. This works fine, except I just don't know how to get the correct link if an image link was defined. What I tried is this:

<f:link.page pageUid="{course.image.originalResource.link}">
    <f:image image="{course.image}"/>
</f:link.page>

This works, except when I define a target in the backend this is completely ignored - is there a different way aside from f:link.page or how can I link an image?

1

There are 1 answers

1
rob-ot On

Starting from TYPO3 7.4 you can use typolink

<f:link.typolink parameter="{link}" target="_blank" class="ico-class" title="some title" additionalParams="&u=b" additionalAttributes="{type:'button'}">
Linktext
</f:link.typolink>