Problem/Motivation
With #3244450: Adding title to attached export icons from Views data export the export_icon theme template gained a new variable #title.
This variable is not used by default but can be used in custom theme templates.
It is not set in ExcelExport as it is set in DataExport.
Steps to reproduce
- Use xls_serialization for multiple views.
- Try to differentiate the rendered export link between views in a custom view.
- Notice that there is no easy way to just output the view display title.
Proposed resolution
Set '#title' => $title in ExcelExport as in DataExport.
Remaining tasks
Implement solution
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork xls_serialization-3572607
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tgaugesComment #4
tgaugesI implemented the simple solution: !62
I did not find a test for
\Drupal\xls_serialization\Plugin\views\style\ExcelExport::attachTo. Should there be one?Comment #5
mably commented@tgauges have you given a try to the new Views Data Export Excel module?
This might also be a solution to your problem.
It was created after this issue: #3560297: Style plugin attachTo() not being invoked
Comment #6
mably commentedLooks like a no brainer to me, merging.
Comment #9
tgauges@mably Thank you.
I did not try views_data_export_excel yet, but I will. It seems like a cleaner solution.
Comment #10
tgauges