Feature #83285
closedSupport HTML5 "download" attribute in links
0%
Description
Problem/Description¶
It would be nice to add the possibility to configure the download
-attribute for relevant VHs which are creating links.
Acceptance Criteria¶
- The TYPO3 integrator can activate the download attribute without a value
- The TYPO3 integrator can activate the download attribute with a specific value (filename for saving on client device)
- The TYPO3 integrator can add links to FAL file and activate the download attribute where the value is taken from core's
sys_file_metadata.download_name
field
Updated by Riccardo De Contardi over 6 years ago
- Related to Feature #81991: FSC Uploads: a-tag attribute download added
Updated by Riccardo De Contardi over 6 years ago
Taken from the description of #81991
<a href="{file.publicUrl}" {f:if(condition:file.download,then: ' download="{file.name}"')} {f:if(condition:data.target,then: ' target="{data.target}"')}>
Updated by Claus Due over 6 years ago
- Subject changed from Support HTML5 "download" attribute in all relevant link viewhelpers (e.g. file download links) to Support HTML5 "download" attribute in links
- Category changed from Fluid to Site Handling, Site Sets & Routing
- Priority changed from Should have to Could have
I've taken the liberty of changing the category to "Link Handling & Routing" and the priority to "Could have".
This should IMHO be seen as a feature request to add this capability at a much lower level: in TypoLink itself. As you mention in the criteria, it should be possible for an editor to configure this and that means it should be part of the regular link creation when you target files, and that the attribute should be added when cObj->typoLink creates a tag.
After that is then added it may be necessary to adapt one or two ViewHelpers, specifically those that create the href with typoLink but the tag with Fluid's AbstractTagBasedViewHelper parent class.
NB: It may even be possible to somehow configure typoLink default behaviors to add this attribute; just mentioning that to say it might be possible for you to get this behavior by customising TS a bit and using typoLink whenever you can (it can also create links to FAL files, just use the t3://file?uid=123 format of link)
Updated by Benni Mack almost 5 years ago
Jousch: So you want to configure this on a per-file basis or file-type basis on a file record? or in the fluid template? Or via TypoScript / TypoLink (this way, not only fluid would benefit from this?)
Updated by Oliver Bartsch about 3 years ago
I'm closing this issue since it has been resolved with #67111. In case you think this is the wrong decision please contact me or create a new issue with a reference to this one.
Updated by Oliver Bartsch about 3 years ago
- Related to Feature #67111: eID=dumpFile - support $asDownload and $alternativeFilename through GPVars added
Updated by Georg Ringer 3 months ago
- Related to Feature #100254: File Link Browser: Support `download` attribute added