Semantic views

2,361
-1

Published on

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

Published in: Technology, Business

Semantic views

  1. 1. Semantic Views<br />And More!<br />
  2. 2. Earl Miles<br /><ul><li> Views
  3. 3. Panels
  4. 4. Chaos Tool Suite
  5. 5. Nodequeue
  6. 6. Advanced Help
  7. 7. D6 theme system
  8. 8. D7 AJAX System</li></ul>merlinofchaos<br />Logrus, Inc<br />
  9. 9. What is Semantic Views?<br />Originally a module by Benjamin Doherty (AKA bangpound)<br />Control HTML elements for semantic meaning.<br />Site builders wanted fewer places to look for Views configuration.<br />Views templates are difficult to master.<br />Provides more power through the interface.<br />Undoes the powerful concept of separation of logic and presentation.<br />
  10. 10. Basic views output<br />
  11. 11. Basic views output<br />Field Element<br />
  12. 12. Basic views output<br />Label Element<br />
  13. 13. Basic views output<br />Wrapper Element<br />
  14. 14.
  15. 15.
  16. 16.
  17. 17.
  18. 18.
  19. 19.
  20. 20.
  21. 21.
  22. 22. Semantic Summary<br />Complete control of the HTML within the row<br />Complete control of the classes within the row<br />Pair with your custom CSS<br />Great when the view builder understands HTML/CSS<br />
  23. 23. Downsides<br />Not so good when you really want to separate logic from presentation.<br />When your views authors are not themers and don’t understand what your themers want.<br />Views row style template now even harder to modify due to all of the moving parts.<br />
  24. 24. But I want to group fields together!<br />So do I!<br />Can’t do this in the Views UI.<br />But you can use a panel layout with Views.<br />You can also use Display Suite, but I’m not going to cover that.<br />
  25. 25. Like this!<br />
  26. 26. Instant grouping!<br />
  27. 27.
  28. 28.
  29. 29. Things to think about<br />Flexible layouts are easy to make, but have heavy markup.<br />Layout plugins are not difficult to write. There are many tutorials available on google.<br />.inc file, regions, css, template, preprocess<br />Can then customize layout however you need.<br />
  30. 30. View context + Panels<br />Allow you to put rows within a layout.<br />Allow you to select which fields per row.<br />Allow you to place things in between your rows.<br />
  31. 31.
  32. 32.
  33. 33.
  34. 34.
  35. 35.
  36. 36. Making the fields easy to ID<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×