Build Your Site with Views

963 views

Published on

For the non-programmer, building your site with cck and views puts the power of Drupal in your hands.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
963
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Build Your Site with Views

  1. 1. Build Your Site With Views <ul><li>Peter (winston) </li></ul>
  2. 2. It Starts With CCK <ul><li>Underpinning of building sites with views
  3. 3. Build your own database!
  4. 4. No SQL Knowledge required </li></ul>
  5. 5. Nodereference Fields <ul><li>Relate your content!
  6. 6. Bands have albums...
  7. 7. Jobs have applicants...
  8. 8. Make your own one to many relationships </li></ul>
  9. 9. Views Your way to assemble the CCK pieces you've created into a site with little or no coding.
  10. 10. Conceptualizing Views <ul><li>It's a query builder </li><ul><li>...but you don't need to know SQL </li></ul><li>It's a list and table builder </li><ul><li>...but you don't need to know XHTML </li></ul></ul>
  11. 11. Views is Mature <ul><li>First dev release </li><ul><li>Dec 2, 2005 (for Drupal 4.7) </li></ul><li>First official release </li><ul><li>Nov 2006 (for Drupal 4.7 and 5) </li></ul><li>Views version 2 release </li><ul><li>Oct 17, 2008 (after MANY alpha and beta releases) </li></ul></ul>
  12. 12. Views is Supported <ul><li>Merlinofchaos is the author </li><ul><li>Of Views
  13. 13. And Panels
  14. 14. And Ctools
  15. 15. And... </li></ul><li>Many other contributors
  16. 16. Probably in Core in future... </li></ul>
  17. 17. How would you do it without Views? <ul><li>Write a module in php </li><ul><li>Code defines fields, creates table schema, defines CRUD activity
  18. 18. Code extracts data for display with api calls </li></ul><li>CODE your own content type and write your own queries
  19. 19. continued... </li></ul>
  20. 20. Without views... <ul><li>You need to know (and well) </li><ul><li>PHP
  21. 21. Drupal API
  22. 22. SQL
  23. 23. HTML, CSS, etc. </li></ul><li>Because you're doing it all yourself
  24. 24. Need a new field? Call the developer.
  25. 25. Theme it... </li></ul>
  26. 26. How do you build with Views? <ul><li>Create the content types you need (article, blog, product, staff, job, event, etc.)
  27. 27. Add the fields you need for each type (text fields, number fields, date fields, etc.)
  28. 28. Have one to many relationships? No problem, use nodereference fields.
  29. 29. Create views to &quot;query&quot; for what you want from your content types (it's point and click!)
  30. 30. Theme it... </li></ul>
  31. 31. Demolition!
  32. 32. Starting Point <ul><li>Using Marinelli Theme </li><ul><li>Well supported, been around awhile </li></ul><li>Use Admin module (and related tao/rubik theme) for user friendly admin interface
  33. 33. Key modules used </li><ul><li>Admin, content (cck) and related, imagecache, noderelationships, viewfield, views and related, other supporting modules </li></ul></ul>
  34. 34. Staff <ul><li>Create the content type
  35. 35. Make a Staff page view
  36. 36. Make a home page block
  37. 37. ...done... </li></ul>
  38. 38. Articles <ul><li>Author as a nodereference (why?)
  39. 39. Use default display for now
  40. 40. Note taxonomy terms </li></ul>
  41. 41. News Menu <ul><li>Use built in taxonomy view
  42. 42. Modify to show only articles
  43. 43. Make a menu </li></ul>
  44. 44. Departments <ul><li>Dept Head (staff) node reference
  45. 45. Departments page view </li></ul>
  46. 46. Courses <ul><li>Reference to qualified instructors (staff)
  47. 47. Reference to departments is this course in
  48. 48. Course Listings view (by dept) </li></ul>
  49. 49. What's not there yet? <ul><li>Individual staff page should show what this person is certified to teach!
  50. 50. Dept page should list both dept head and courses in this dept
  51. 51. Individual course page should show certified instructors
  52. 52. Selecting related information on data entry needs to be easier (can views help?) </li></ul>
  53. 53. Viewfield <ul><li>In dev, but heavily used anyway (fyi)
  54. 54. Embed a view into a node display (teaser, full node, or both)
  55. 55. Can be passed an argument (typically nodeid)
  56. 56. EASY to display related information along with a node without programming </li></ul>
  57. 57. Almost done... <ul><li>Courses – qualified instructors view
  58. 58. Departments – Related courses view
  59. 59. Articles – Authors views (one for teaser, one for node) </li></ul>
  60. 60. Noderelationships <ul><li>Nice UI!
  61. 61. Depends on modalframe, jquery_ui, jquery update </li></ul>

×