5

It is possible that you can define the difference between a view mode and a style plugin. As far as I understand a view mode defines what fields are outputted and a style plugin decides how to render those fields. However, is a style plugin always connected with a panel?

4

A view mode is an entity specific concept. It defines how to render a, which could for example determine which fields are displayed and how, but nothing prevents a view mode of a "gallery image" to pull in and render a View that shows the other images in the same gallery for example.

A style plugin, as a Panels specific concept, does a similar thing to view modes, but on a "Pane" level in Panels.

A style plugin mostly makes sense on generic styles that one wants to apply across many different types of panes, where a view mode makes sense for things that apply on a per entity or bundle basis.

In my own experience, I've mostly implemented designs that had a consistent look across panes, making it easier to make global style changes to the pane template, but styles can allow a site administrator to mix and match styles across panes at will.

4

I'll give this a shot.

A view mode is a concept that exists for entities. A node has for example the view modes Full content, Teaser and RSS. And as you say different view modes can have different settings. An image might be just an URL in the RSS view mode and a large rendered image in the Full content view mode. It is also possible to have different order and visibility settings for each field in each view mode.

A Panel region or a Panel pane has something called a Style setting, this is also a Style plugin. There are styles such as No style, Rounded corners etc. Changing style will change the markup that surrounds your region or pane. In most cases the Style setting for the pane is something you do not change.

But to answer your question, yes a region or a pane always has a set "Style" and that Style is by default set to use the style plugin "No style".

A style plugin is a concept that also exists in Views. Under the setting Format in Views you have the option to choose between Style plugins such as Grid, HTML list, Jump menu, Table and Unformatted list. When you choose a different style plugin the markup surrounding and in between each row changes.

  • 1
    Bah, you beat me to it by a minute ;) +1 – Letharion Jul 31 '13 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.