Build Your Site with Views

Embed Size (px)

DESCRIPTION

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

Citation preview

  • 1. Build Your Site With Views
    • Peter (winston)

2. It Starts With CCK

  • Underpinning of building sites with views

3. Build your own database! 4. No SQL Knowledge required 5. Nodereference Fields

  • Relate your content!

6. Bands have albums... 7. Jobs have applicants... 8. Make your own one to many relationships 9. Views Your way to assemble the CCK pieces you've created into a site with little or no coding. 10. Conceptualizing Views

  • It's a query builder
  • ...but you don't need to know SQL

It's a list and table builder

  • ...but you don't need to know XHTML

11. Views is Mature

  • First dev release
  • Dec 2, 2005 (for Drupal 4.7)

First official release

  • Nov 2006 (for Drupal 4.7 and 5)

Views version 2 release

  • Oct 17, 2008 (after MANY alpha and beta releases)

12. Views is Supported

  • Merlinofchaos is the author
  • Of Views

13. And Panels 14. And Ctools 15. And... Many other contributors 16. Probably in Core in future... 17. How would you do it without Views?

  • Write a module in php
  • Code defines fields, creates table schema, defines CRUD activity

18. Code extracts data for display with api calls CODE your own content type and write your own queries 19. continued... 20. Without views...

  • You need to know (and well)
  • PHP

21. Drupal API 22. SQL 23. HTML, CSS, etc. Because you're doing it all yourself 24. Need a new field?Call the developer. 25. Theme it... 26. How do you build with Views?

  • Create the content types you need (article, blog, product, staff, job, event, etc.)

27. Add the fields you need for each type (text fields, number fields, date fields, etc.) 28. Have one to many relationships?No problem, use nodereference fields. 29. Create views to "query" for what you want from your content types (it's point and click!) 30. Theme it... 31. Demolition! 32. Starting Point

  • Using Marinelli Theme
  • Well supported, been around awhile

Use Admin module (and related tao/rubik theme) for user friendly admin interface 33. Key modules used

  • Admin, content (cck) and related, imagecache, noderelationships, viewfield, views and related, other supporting modules

34. Staff

  • Create the content type

35. Make a Staff page view 36. Make a home page block 37. ...done... 38. Articles

  • Author as a nodereference (why?)

39. Use default display for now 40. Note taxonomy terms 41. News Menu

  • Use built in taxonomy view

42. Modify to show only articles 43. Make a menu 44. Departments

  • Dept Head (staff) node reference

45. Departments page view 46. Courses

  • Reference to qualified instructors (staff)

47. Reference to departments is this course in 48. Course Listings view (by dept) 49. What's not there yet?

  • Individual staff page should show what this person is certified to teach!

50. Dept page should list both dept head and courses in this dept 51. Individual course page should show certified instructors 52. Selecting related information on data entry needs to be easier (can views help?) 53. Viewfield

  • In dev, but heavily used anyway (fyi)

54. Embed a view into a node display (teaser, full node, or both) 55. Can be passed an argument (typically nodeid) 56. EASY to display related information along with a node without programming 57. Almost done...

  • Courses qualified instructors view

58. Departments Related courses view 59. Articles Authors views (one for teaser, one for node) 60. Noderelationships

  • Nice UI!

61. Depends on modalframe, jquery_ui, jquery update