2

I have an fluid code for mask extension:

<f:image image="{file}" alt="{file.alternative}" title="{file.title}"  class="img-fullwidth" />

I want to wrap that code with a tag with href to the same image file, so finally I will have <a href="image-file-source"><img src="image-file-source" /></a>"

Is that even possible with fluid ?

Thanks in advance for any help

3 Answers 3

3

Try to something like this

 <f:link.typolink parameter="{file.originalResource.publicUrl}">
      <f:image image="{file}" alt="{file.alternative}" title="{file.title}" class="img-fullwidth" />
</f:link.typolink>
Sign up to request clarification or add additional context in comments.

Comments

1

This working for me

<a href="{file.originalResource.publicUrl}">
    {file.originalResource.title}
</a>

In your example

<a href="{file.originalResource.publicUrl}">
    <f:image image="{file}" alt="{file.alternative}" title="{file.title}" class="img-fullwidth" />
</a>"

2 Comments

This solution does not respect config.absRefPrefix if TYPO3 is installed in a sub-folder
Thank you Heinz, your solution currently works good. I hope that it still working when i deploy to live server.
0

Use the link.typolink viewhelper like this:

<f:for each="{data.image}" as="file">
    <f:link.typolink parameter="{file.link}">
        <f:image image="{file}" />
    </f:link.typolink>
</f:for>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.