Use buttonLink droplet with file

Hello,

I would like to use the content droplet “ButtonLink” and it is working as expected when using an internal page name as target and also when using a fully qualified external link to a file.

But if the target is a file-namespace the rendered icon contain either the source code or the button is not displayed but replaced by the default file-icon.

Sources I tried:

{{ButtonLink|external=no|target=[[Datei:HR:arbeitszeitrichtlinien.pdf]]|label=Arbeitszeitrichtlinie 2005|format=red}}

{{ButtonLink|external=no|target=[:Datei:HR:arbeitszeitrichtlinien.pdf]|label=Arbeitszeitrichtlinie 2005|format=red}}

Is it possible to use a file link in the button-link-droplet? What would be the syntax? And bonus question: I would like to directly open the file without the File-Page, is that possible at all?

Kind regards
Florian

Hello and welcome to the BlueSpice Community forums!

Have you tried

{{ButtonLink|external=no|target=[[:Datei:HR:arbeitszeitrichtlinien.pdf]]|label=Arbeitszeitrichtlinie 2005|format=red}}

Double brackets?

I aso tried doube brackets but to no avail.

BUT: answering my second question, when using Media: instead of File: I can directly access the download without having to to use the File-page. A small tweak lead me to the final solution, there should be no brackets at all:

{{ButtonLink|external=no|target=:Media:HR:arbeitszeitrichtlinien.pdf|label=Arbeitszeitrichtlinie 2005|format=red}}

This one works and looks as expected.

1 Like