Project

General

Profile

Actions

Feature #83285

closed

Support HTML5 "download" attribute in links

Added by Josef Glatz over 6 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2017-12-01
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #81991: FSC Uploads: a-tag attribute downloadClosed2017-07-27

Actions
Related to TYPO3 Core - Feature #67111: eID=dumpFile - support $asDownload and $alternativeFilename through GPVarsClosed2015-05-22

Actions
Actions #1

Updated by Riccardo De Contardi over 6 years ago

  • Related to Feature #81991: FSC Uploads: a-tag attribute download added
Actions #2

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}"')}>
Actions #3

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 Link Handling, Site Handling & 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)

Actions #4

Updated by Benni Mack over 4 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?)

Actions #5

Updated by Oliver Bartsch almost 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.

Actions #6

Updated by Oliver Bartsch almost 3 years ago

  • Status changed from New to Closed
Actions #7

Updated by Oliver Bartsch almost 3 years ago

  • Related to Feature #67111: eID=dumpFile - support $asDownload and $alternativeFilename through GPVars added
Actions

Also available in: Atom PDF