This has been mentioned before in these two issues http://drupal.org/node/432798 and http://drupal.org/node/854122.
In Views, the "Theme: Information" shows available theme templates. It would be easier to read if the template files were shown as a bulleted list, rather than as a comma-separated list. eg:
Suggested layout:
- views-view.tpl.php
- views-view--my-first-view.tpl.php
- views-view--default.tpl.php
- views-view--default.tpl.php
- views-view--page.tpl.php
- views-view--my-first-view--page.tpl.php
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | clearer_theme-1777580-14.patch | 436 bytes | valentine94 |
| #1 | theme_suggestions_as_item_list-1777580-1.patch | 436 bytes | StoraH |
Comments
Comment #1
StoraH commentedHere is a patch that lists the theme suggestions in a bullet list.
Comment #2
dawehnerCould you please post a screenshot, so people could do a visual review.
Comment #3
StoraH commentedYes I can, here's some before and after screenshots.
Comment #4
dawehnerI totally agree that this looks much better, even if it will maybe need a lot of space.
Comment #5
aspilicious commentedYes! Looks great!
But I'm the only one who is seeing duplicates? o_O
Comment #6
StoraH commentedYes that's true. To solved the space issue it could be an idea to make theme collapse like the main groups in views. Or what do you think?
Comment #7
StoraH commentedHere is the same patch ported for Drupal 8
Comment #8
aspilicious commentedI mean that in the same group there a duplicates
views-view--default.tpl.php is listed twice just after each other
Comment #9
StoraH commentedI've seen the duplicate and it's an other issue. Thats why I think this patch is important, so you actually can se what's printed out.
Comment #10
dawehnerThis is the cod used to generate such a theme suggestion:
So basically you get one theme suggestion for all tags, and one theme suggestion per tag.
I kind of agree that it would be possible in d8 to drop the first line as it is hard to see a use-case to use multiple tags as one key for the theme suggestion. Do you have any oppinion regarding that?
Comment #11
dawehnerMoved out this discussion in #1782980: Only provide theme suggestions for each views tag, not one for all
Comment #12
dawehnerLet's get it in and fix the rest in the other issue. Committed and pushed to 8.x-3.x
Comment #13
valentine94Back-port for 7.x-3.x-dev
Comment #14
valentine94Re-attach patch for testing.
Comment #15
chris matthews commentedThe 4 year old back-ported patch in #14 to views_plugin_display.inc applied cleanly to the latest views 7.x-3.x-dev and works great for me.
Comment #17
damienmckennaCommitted. Thank you.