Dave Zen
2017-08-07 11:58:21 UTC
Hi,
I want to check in fluid if the editor has added a PDF file to a content element but I'm not sure how to do that.
If the editor adds a PDF file (as a media asset) I want to display a button where the user can download this PDF, otherwise no button should be shown.
Now my code looks like this:
<a href="fileadmin/pdf_folder/{files.1.properties.name}" class="btn" role="button">PDF</a>
This will generate a button no matter if the pdf is included or not. How can I check if a PDF was added by the editor in the content element?
I know that there is the possibility to use <f:if> with a condition but I'm not sure how the condition should look like in this context.
Thank you very much.
I want to check in fluid if the editor has added a PDF file to a content element but I'm not sure how to do that.
If the editor adds a PDF file (as a media asset) I want to display a button where the user can download this PDF, otherwise no button should be shown.
Now my code looks like this:
<a href="fileadmin/pdf_folder/{files.1.properties.name}" class="btn" role="button">PDF</a>
This will generate a button no matter if the pdf is included or not. How can I check if a PDF was added by the editor in the content element?
I know that there is the possibility to use <f:if> with a condition but I'm not sure how the condition should look like in this context.
Thank you very much.