Uploaded on

How Semantic Views works in Drupal and some other ways to control your output with Views.

How Semantic Views works in Drupal and some other ways to control your output with Views.

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,945
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
32
Comments
0
Likes
9

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Semantic Views
    And More!
  • 2. Earl Miles
    merlinofchaos
    Logrus, Inc
  • 9. 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.
  • 10. Basic views output
  • 11. Basic views output
    Field Element
  • 12. Basic views output
    Label Element
  • 13. Basic views output
    Wrapper Element
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. 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
  • 23. 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.
  • 24. 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.
  • 25. Like this!
  • 26. Instant grouping!
  • 27.
  • 28.
  • 29. 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.
  • 30. 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.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. Making the fields easy to ID