Created
November 17, 2015 18:45
-
-
Save isramv/806112b9150e0de9e090 to your computer and use it in GitHub Desktop.
Tempalte sugestions D8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Drupal\Core\Url; | |
| function hal_theme_theme_suggestions_select_alter(&$suggestions, &$vars, $hook) | |
| { | |
| // This will grab the view_id from the request | |
| $request = \Drupal::request()->attributes->get('view_id'); | |
| if (!empty($request)) { | |
| $suggestions[] = 'select__' . $request; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment