Closed (fixed)
Project:
Bootstrap
Version:
8.x-3.x-dev
Component:
Templates
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2016 at 17:04 UTC
Updated:
4 Jan 2017 at 04:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
markhalliwellYou need to implement a @BootstrapAlter plugin in your sub-theme:
Comment #3
markhalliwellActually, I suppose we could parse
$variables['theme_hook_original']and append them to the suggestion provided, like is done forlinks__dropbutton, e.g.input__form_control__search.edit: the above is an easy workaround until this can be implemented though.
Comment #4
pyxio commentedthanks Mark. i create ThemeSuggestion.php in my subtheme with the code provided and i am still not getting the suggestion available to me. what might i be doing wrong? cheers
Comment #5
markhalliwellThis entire alter hook needs to be refactored TBH. I'll upload a patch here shortly for you to test.
Comment #6
markhalliwellComment #7
markhalliwellBetter title
Comment #8
markhalliwellI've gone ahead and created a CR for this as well: https://www.drupal.org/node/2838155
Comment #9
pyxio commentedgood morning
i applied this patch and theme suggestion is still not working. just to be sure i handled the part in my subtheme correctly ... i create a file located at src/Plugin/Alter/ThemeSuggestions.php which contains the code in #2 (of course i changed THEMENAME to the name of my sub-theme. Is this correct? Cheers
Comment #10
markhalliwellIgnore #2, just apply the patch in #6.
The theme hook suggestion that should work now is:
input--form-control--search.html.twigComment #11
pyxio commentedawesome. indeed it does! do i still need to keep src/Plugin/Alter/ThemeSuggestions.php in my sub-themes? thanks so much for quickly addressing this and for all your contributions in general to this great drupal theme. cheers
Comment #12
markhalliwellNo, not unless you need to add/remove/change any suggestions (which it doesn't sound like you do).
You're quite welcome :D Just glad to help provide a solid base theme.
Comment #14
markhalliwellComment #15
markhalliwellTypo in title (for prosperity sake) and expanded to include method (for searchability sake).
Comment #16
markhalliwellUgh, too tired.
Comment #17
pyxio commentedgotta love the attention to detail ;o) now for some well deserved rest! cheers