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.

Somewhat related: #964188: Create sample nodes for display

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scottrigby’s picture

Status: Active » Needs review

I 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.

scottrigby’s picture

Decided to promote to a named project, but would still be happy to include within the main Styleguide module.

dead_arm’s picture

I'd be happy to incorporate this into the module if you post a patch. :)

dead_arm’s picture

Status: Needs review » Active
scottrigby’s picture

Status: Active » Needs review
FileSize
8.75 KB

OK, added as a single git-formated patch ^_^

seanr’s picture

+1 on this. Incredibly useful.

mparker17’s picture

Assigned: Unassigned » mparker17
Issue summary: View changes
Status: Needs review » Needs work

The 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.

mparker17’s picture

Assigned: mparker17 » Unassigned
FileSize
8.73 KB
402 bytes

Here's a patch that fixes the hidden dependency.

mparker17’s picture

Status: Needs work » Needs review

Back to "needs review".

mparker17’s picture

FileSize
8.8 KB
469 bytes

Added a link to the main configuration screen, see #2302067: Link to the main configuration page from the Modules page.