Inspired by #2058279: Align mini pager accessibility markup to full pager., currently postponed on changes in #2004872: [meta] Theme system architecture changes and resolution of #939462: Specific preprocess functions for theme hook suggestions are not invoked (we need the ability to have a suggestion-specific preprocess function).
Updated: Comment #3
Problem/Motivation
The default pager and the Views mini pager use an identical Twig template. Let's consolidate them and have the mini pager use a theme suggestion instead.
Proposed resolution
- Remove views-mini-pager.html.twig, update any calls to '#theme' => 'views_mini_pager' to 'pager__mini_pager' or similar.
- Use a suggestion-specific preprocess function (template_preprocess_pager__mini_pager()) - postponed on changes in #2004872: [meta] Theme system architecture changes.
Remaining tasks
Create patch
User interface changes
n/a
API changes
Removal of views_mini_pager theme hook.
Related Issues
#2058279: Align mini pager accessibility markup to full pager.
#1912604: Convert theme_views_mini_pager to twig
#1804614: [meta] Consolidate similar twig templates and properly use theme suggestions in core
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | views-mini-pager-to-pager-suggestion-2076301-10.patch | 9.51 KB | l0ke |
| #9 | views-mini-pager-to-pager-suggestion-2076301-9.patch | 6.05 KB | l0ke |
Comments
Comment #1
star-szrMissing tag.
Comment #2
star-szrAnd another.
Comment #3
mondrakeUpdating summary as #2058279: Align mini pager accessibility markup to full pager. is in now.
Comment #3.0
mondrakeUpdate first line
Comment #3.1
mondrakeUpdated issue summary, after #2058279: Align mini pager accessibility markup to full pager. was committed.
Comment #4
star-szrGreat, thanks @mondrake!
Comment #4.0
star-szrUpdated issue summary.
Comment #5
mitokens commentedComment #6
lauriiiUnpostponing!
Comment #7
dawehnerWell, its maybe not that obvious, because for this case we pass ing different data than for the normal case. Is the use of the same base template still semantically the right thing?
Comment #8
l0keComment #9
l0keComment #10
l0keAdded pager--mini-pager.html.twig
Comment #13
keopx@lokeoke are you working on it? otherwise please change to unassigned.
Comment #14
lauriiiComment #15
andypostIs there any policy about to remove templates in 8.x?
Comment #16
dawehnerWell, we would certainly need to keep it, but we could add maybe a special template suggestion, so it will fallback to it, but classy will provide a
pager__mini_pagertemplate which is exactly the same as the normal pager?Comment #18
joelpittetComment #31
smustgrave commentedClosing this out as an old issue. Think it would also cause several issues in contrib themes.
Comment #32
smustgrave commented