Productivity without limits CCK, VIEWS & PANELS

51
Productivity without limits CCK, VIEWS & PANELS First edition Drupalcamp Vienna 2009 Hagen Graf http://cocoate.com http://twitter.com/hagengraf

description

Slides for a 30 minutes talk at Drupalcamp Vienna, November 27th, 2009

Transcript of Productivity without limits CCK, VIEWS & PANELS

Page 1: Productivity without limits CCK, VIEWS & PANELS

Productivity without limits CCK, VIEWS & PANELS

First edition

Drupalcamp Vienna 2009

Hagen Graf

http://cocoate.com

http://twitter.com/hagengraf

Page 2: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 2

The target group of this talk ...

has a rough idea of ● why using databases (good start)

● the idea of lego bricks (optional but helpful)

● how to find hints on drupal.org (important)● HTML, CSS, Firefox, Firebug, FTP, Editor (important)

● PHP, GIMP, Photoshop (optional)

● being creative (not always bad)

● writing an invoice (necessary to survive :-) )

Page 3: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 3

I assume this is not like you :-)

Photo: http://www.flickr.com/photos/awarnach/3483532628/

Page 4: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 4

Better?

Photo: http://www.flickr.com/photos/michale/105825096/

Page 5: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 5

The client often wants to havesomething very complicated

Photo http://www.flickr.com/photos/reinante/3746991396

Page 6: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 6

Client's focus 1Quality

Photo http://www.flickr.com/photos/elaws/4039318594/

Page 7: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 7

Client's focus 2

Photo http://www.flickr.com/photos/30046478@N08/3562725745/

Fast completion

Page 8: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 8

Client's focus 3

Photo http://www.flickr.com/photos/35188692@N00/143210068/

Cheap

Page 9: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 9

Your reply in the past

You can only have two of them!

• cheap & fast completion → (NO quality)

• cheap & quality → (NOT fast)

• fast completion & quality → (oh la la - NOT cheap :-) )

Page 10: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 10

One possible solution

developing, developing, developing, developing, developing, developing, developing, developing, developing, developing, developing, developing, developing, developing, developing

Page 11: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 11

Problems• Module updates

• Core hacking

• Scalability

• Costs

• Communication

• Documentation

• Finding developers

Page 12: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 12

Another possible solution

• Use the drupal “lego bricks“, for exampleCCK, VIEWS & PANELS

• Learn to find the right modules

• Use your developer know-how to contribute to the drupal project and make the bricks better

Page 13: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 13

Hint for hardcore web agencies

… it is possible to earn money... by honest consulting … by using the pre-built bricks... everything is more transparent to your clients and of course for you too :-)

Page 14: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 14

Blogpost Dries - May 3, 2006 - 17:40

“We want users, not developers, to be able to create custom content types from within

Drupal's administration interface.“

“The current code name for this project is the "content construction kit" (CCK). The project's goal is to allow users to create custom content

types in Drupal through the web.“

http://buytaert.net/custom-content-types

Page 15: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 15

Drupal 6 core (2009)

by using a browser - you can

• create new content types

• assign access rights to different roles (create, edit, delete)

• assign taxonomy vocabularies to your new content type

• change the design by editing node-....tpl.php

Page 16: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 16

Have you ever read README.txt?Content Construction Kit

------------------------

NOTE: Install the advanced_help module (http://drupal.org/project/advanced_help)

to access more help (writing still in progress...)

To install, place the entire CCK folder into your modules directory.

Go to Administer -> Site building -> Modules and enable the Content module and one or more field type modules:

Page 17: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 17

Why CCK?

It has a

• text.module

• number.module

• userreference.module

• nodereference.module

for creating additional fields in content-types

Page 18: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 18

Why CCK?

It has an

• optionswidget.module

• fieldgroup.module

for creating additional radio & checkboxes and group fields together in collapsible fieldsets

Page 19: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 19

Why CCK?

It has a

• content_permissions.module

for assigning field based access rights to roles

Page 20: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 20

Thank you for CCKMaintainers

The Content Construction Kit was originally developed by:

• John Van Dyk

• Jonathan Chaffer

Current maintainers:

• Karen Stevenson

• Yves Chedemois

And many other contributors

Page 21: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 21

A few useful modules for my work

• Date

• FileField

• ImageField

• MP3 Player

• Embedded Media Field

• Node Relationships

• Corresponding node references

• Node Reference URL Widget

Page 22: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 22

Date• A date field

Page 23: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 23

File field• Upload a file

Page 24: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 24

Imagefield

Use it for images

Page 25: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 25

Gallery Widget for ImageFieldhttp://drupal.org/project/galleria

Example http://bloghouse.org/de/galerie-im-blogeintrag

Page 26: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 26

Mp3 player widget for FileField

Example http://www.evangelisch.de/maerchen/der-mit-dem-frosch-knutscht

http://drupal.org/project/mp3player

Page 27: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 27

Embedded field

Video: Blip.TV, Brightcove, Daily Motion, Google, Guba, JumpCut, imeem, Lastfm, LiveVideo, MetaCafe, MySpace, Revver, SevenLoad, Spike.TV, Tudou, Veoh, Vimeo, YouTube, Local videos (when already uploaded in the files directory)

Image: Flickr, ImageShack, PhotoBucket, Picasa

Audio: Odeo, Podcast Alley, podOmatic

http://drupal.org/project/emfield

Page 28: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 28

Embedded field

Page 29: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 29

Node Relationships

See also http://cocoate.com/node/463

http://drupal.org/project/noderelationships

Page 30: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 30

Node Relationships

See also http://cocoate.com/node/463

Node references via Popup – so cool :-)

Page 31: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 31

Node references urlhttp://drupal.org/project/nodereference_url

Page 32: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 32

Corresponding node relationshipshttp://drupal.org/project/cnr

Page 33: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 33

Why using CCK?

You can fulfill the needs of your clients!

• Quality

• Fast

• Cheap

Page 34: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 34

Views

“This tool is essentially a smart query builder“

merlinofchaos

http://drupal.org/project/views

Page 35: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 35

Views

With views you can configure

• Pages

• Blocks

• Feeds

Based on content types and additional fields

Page 36: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 36

Views Page

Example from http://eu.cocoate.com/

Page 37: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 37

Views Block

Page 38: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 38

Views Feed

Page 39: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 39

Views – exposed filters

Page 40: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 40

The making of

Page 41: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 41

Views Relationships

Imagine a photo db in a newspaper

• Content-type photo

• Content-type article

• Node reference on photo-ID

• Result could be a list of articles with photos from the photo content-type

Page 42: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 42

Views Parameter

Imagine a used car dealer

• Cars on different places

• He wants to have blocks on his website with cars related to places

• Or blocks with places related to the car :-)

• Parameters are coming from the URL

Page 43: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 43

Views – additional designs• Build tagclouds with views tagadelic

• Or coverflow with views imageflow

Page 44: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 44

Views – additional modules

Like a swiss army knife :-)

• Views Bonus Pack

• Views Bulk Operations

Page 45: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 45

Views – Theming• Reduce markup

• Introduce your own css

Page 46: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 46

Thank you for views & panels• Earl Miles, Sony, many contributors

Page 47: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 47

Panels

• Combining all Drupal objects on one page

• Nodes

• Blocks

• Views

• Add Content

http://drupal.org/project/panels

Page 48: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 48

Panels

Page 49: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 49

Behind the scenes

Page 50: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 50

I could talk hours about this ...

But when I created this slide I realized ...

• It's more fun to try something in real time

• Unfortunately not in this talk

• But we can try here at the camp

• Any questions so far?

Page 51: Productivity without limits CCK, VIEWS & PANELS

DrupalCamp Vienna, Nov. 09 cocoate.com 51

Thank you very much!

have fun using CCK, VIEWS an PANELS

Hagen Graf

[email protected]

http://cocoate.com

http://twitter.com/hagengraf