btw_labs / view_mode_selector
Our forked version of the view_mode_selector drupal contrib module.
Installs: 162
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 18
Type:drupal-module
This package is auto-updated.
Last update: 2025-04-12 06:12:27 UTC
README
Current Maintainers:
BTW LABS ;)
View Mode Selector creates a new field type called View Mode Selector which will override the view mode of an entity.
Installation
-
Install the module the drupal way.
-
Go to Manage fields and just select View mode selector as field type.
-
Select view modes that should be provided.
-
As form widget you can choose between a Select list, Radio buttons or Icons. Icons allows you to upload an icon for a view mode which will be used instead of the view mode label in the widget form.
-
Create or edit an entity with the field attached and select a view mode.
-
Every time an entity is rendered with the "view_mode_selector" view mode, View Mode Selector will change the view mode to the user selected one.
Troubleshooting
When the view mode of an entity did not change as expected a solution could be
to check which module are implementing the hook_entity_view_mode_alter
, maybe another one overrides the view mode after View Mode Selector did it.