Display Inherit

Component ID

2593673

Component name

Display Inherit

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

650

Component created

Component changed

Component body

The display inherit module will attempt to inherit display settings from its 'parent' view modes before falling back to the 'default' display. This is works in combination with the BEM style syntax of name design components where if a component view mode is named mediavideo--thumbnail--right it will attempt to inherit settings from the view mode mediavideo--thumbnail, then mediavideo, before eventually falling back to the default display settings if none are specified in the previous view modes.

It also contains a function that themers can utilize in their template.php called display_inherit_inheritance_factory. Calling this function from an entity's preprocess function will create a series of template suggestions as well as preprocess functions that will all an inheritance fallback as described above. This will allow a themer to specify a template file called node--inherit--mediavideo.tpl.php and that would set the markup for the mediavideo__thumbnail__right view mode.