By imclean on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
9.x
Issue links:
Description:
URL options can now be passed on to the file link template. These options are applied to the link itself.
For example, to open a link in a new window the following could be used in template_preprocess_file_link():
$variables['link_options']['attributes']['target'] = '_blank';
See Url::fromUri for a list of valid URL options.
Impacts:
Module developers
Themers