Post on 29-May-2015
description
Semantic Views
And More!
merlinofchaos Logrus, Inc
Earl Miles
• Views• Panels• Chaos Tool Suite• Nodequeue• Advanced Help• D6 theme system• D7 AJAX System
What is Semantic Views?
• Originally a module by Benjamin Doherty (AKA bangpound)
• Control HTML elements for semantic meaning.• Site builders wanted fewer places to look for
Views configuration.• Views templates are difficult to master.• Provides more power through the interface.• Undoes the powerful concept of separation of
logic and presentation.
Basic views output
Basic views output
Field Element
Basic views output
Label Element
Basic views output
Wrapper Element
Semantic Summary
• Complete control of the HTML within the row• Complete control of the classes within the row• Pair with your custom CSS• Great when the view builder understands
HTML/CSS
Downsides
• Not so good when you really want to separate logic from presentation.
• When your views authors are not themers and don’t understand what your themers want.
• Views row style template now even harder to modify due to all of the moving parts.
But I want to group fields together!
• So do I!• Can’t do this in the Views UI.• But you can use a panel layout with Views.• You can also use Display Suite, but I’m not
going to cover that.
Like this!
Instant grouping!
Things to think about
• Flexible layouts are easy to make, but have heavy markup.
• Layout plugins are not difficult to write. There are many tutorials available on google.
• .inc file, regions, css, template, preprocess• Can then customize layout however you need.
View context + Panels
• Allow you to put rows within a layout.• Allow you to select which fields per row.• Allow you to place things in between your
rows.
Making the fields easy to ID