Created on 14 March 2011, about 14 years ago
Updated 11 June 2025, 2 days ago

Hey,

I'd like to have a bit of the Styles structure explained, or checked for misconceptions.

This is how I currently understand the module:

  • Field types - everyone knows field types. For example the File style modules field type is file and the Media modules entity contains a file field. Here modules can define themselves and hook in their containers, styles and presets. For example node reference can provide their styles for the nodereference field type.
  • Container is the term used for Image, Audio and Video. These can be extended with i.e. Youtube, Flickr etc by hooking into styles_default_containers.
  • The styles listed on the File Styles page are currently given by modules, actually they are styles in Styles module given by File Styles. These you can add yourself through the UI or have modules hook into with styles_default_styles. Once you add a File Style they will be available to select in the view modes of Media modules Media Types.
  • Presets are also added by module hooks styles_default_presets (File styles provide them currently). Currently there is no UI for adding or editing these but judging by the code it's on it's way.
  • Effects is not really implemented yet but judging by the code this is where the image styles will be added together with other effects such as colorbox links into the preset. (This is based on some code currently not in use)

This originated from Media module forums

πŸ“Œ Task
Status

Closed: outdated

Version

2.0

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.

Production build 0.71.5 2024