Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
A selection of view modes would be a good addition to Styleguide.
Proposed resolution
Add a submodule styleguide_view_mode that displays examples of configured entity view modes to Style guide, using hook_styleguide()
and a config to limit the selection.
User interface changes
A new configuration UI to limit entity types, bundles, and view modes.
API changes
None.
Related Issues
Somewhat related: #964188: Create sample nodes for display
Comment | File | Size | Author |
---|---|---|---|
#10 | add_view_modes_to_style-2046205-10.patch | 8.8 KB | mparker17 |
Comments
Comment #1
scottrigbyI made a sandbox that takes a first pass at this: Style guide view modes
I can format this into a patch for Styleguide if it feels like a useful addition to this module. I added a few issues in that sandbox, and definitely open to feedback on how to improve that so it addresses additional use cases.
Comment #2
scottrigbyDecided to promote to a named project, but would still be happy to include within the main Styleguide module.
Comment #3
dead_armI'd be happy to incorporate this into the module if you post a patch. :)
Comment #4
dead_armComment #5
scottrigbyOK, added as a single git-formated patch ^_^
Comment #6
seanr+1 on this. Incredibly useful.
Comment #7
mparker17The attached patch has a hidden dependency on the Entity module: see #2302059: Calls entity_view() but the Entity API is not listed as one of it's dependencies..
I'll provide a patch shortly.
Comment #8
mparker17Here's a patch that fixes the hidden dependency.
Comment #9
mparker17Back to "needs review".
Comment #10
mparker17Added a link to the main configuration screen, see #2302067: Link to the main configuration page from the Modules page.