SlideShare a Scribd company logo
1 of 25
Download to read offline
Khalid Baheyeldin, Toronto, Mar 13, 2007
Building Drupal sites
using
CCK, Views and Panels
Khalid Baheyeldin
http://2bits.com
Drupal Users Group, Toronto
Tuesday March 13, 2007
Khalid Baheyeldin, Toronto, Mar 13, 2007
Agenda
● Introduction
● CCK (Content Construction Kit)
● Views
● Panels
● Demo of all of them together
● Questions, discussion
Khalid Baheyeldin, Toronto, Mar 13, 2007
About 2bits.com
● Based in Waterloo, Ontario
● Active member of the Drupal community since 2003
● Member of security and infrastructure teams
● 24+modules on drupal.org (adsense, userpoints, profile CSV,
feedback, nodevote, sitemenu, ...etc.)
● Listed on Drupal.org's service providers section
● Clients mainly in USA and Canada
● Subcontracting development projects
● Customization, development, installation, upgrades, perfor-
mance optimization
Khalid Baheyeldin, Toronto, Mar 13, 2007
Before CCK
● Drupal core
– Has limited number of predefined content types
(page, story, blog, forum, book)
– Fields are: Title and Body
● Contributed modules
– Can define their own types (image, job, weblink,
...etc.)
– Programming knowledge needed
Khalid Baheyeldin, Toronto, Mar 13, 2007
Flexinode
● First attempt at admin-defined content types,
without programming
● Did the job it was set to do
● Scalability and performance issues (joins for
every field)
● Will not be available from 5.x onwards
Khalid Baheyeldin, Toronto, Mar 13, 2007
Content Construction Kit
● Started by Jonathan Chaefer [JonBob]
● Current maintainers
– Yves Chedemois [yched]
– Karen Stevenson [KarenS]
– Darryl O'Pry [dopry]
– Wolfgang Ziegler [fago]
Khalid Baheyeldin, Toronto, Mar 13, 2007
CCK features
● More extensible
– API to define fields
● Exposes fields to views
● Reusable fields
– define a field once and reuse it in many content types)
● Different storage model (see Resources and
Links)
Khalid Baheyeldin, Toronto, Mar 13, 2007
Fields by modules
● Extensibility means that you can write modules
that implement new types
● Examples
– date
– phone numbers (USA, France)
– image
– taxonomy
– email
Khalid Baheyeldin, Toronto, Mar 13, 2007
Theming CCK nodes
● Several ways
– node-content_type.tpl.php
– contemplate module (web based)
Khalid Baheyeldin, Toronto, Mar 13, 2007
Drawbacks?
● Added complexity, needed for functionality
(always a tradeoff)
● Some performance overhead (extra database
tables insert/select/join)
● Extra theming effort (again functionlity)
● Like with all contributed modules, watch out for
longevity of CCK fields implemented by modules
Khalid Baheyeldin, Toronto, Mar 13, 2007
Future of CCK
● CCK is destined for core
● Phased approach
– In 5.x, we have the ability to create content types, but
not fields
– Discussed currently in the community
– Not likely for 6.x (3 months to code freeze)
Khalid Baheyeldin, Toronto, Mar 13, 2007
Views
● Written by Earl Miles (merlinofchaos)
● Really powerful module, allows all sorts of magic
● Customized Node listing
– creating custom blocks from any content type
– creating custom lists from any content type
– On selected fields
– Filters
– Sorting
– Arguments
Khalid Baheyeldin, Toronto, Mar 13, 2007
Views (cont'd)
● Basic info
– Visibility (by role)
– URL
● View type
– Page
● Can be list, table, teasers, ...etc.
– Block
– Provide Menu?
● Headers and footer
– Your own HTML or PHP
Khalid Baheyeldin, Toronto, Mar 13, 2007
Views (cont'd)
● Fields
– Modules can expose fields to views, e.g. image
module exposes the image, thumbnail, ...etc.
– All CCK fields are exposed, and that is where the
power is
● Sorting
– Ascending/Descending
– On one or more fields
Khalid Baheyeldin, Toronto, Mar 13, 2007
Views Filters
● Filters
– Can be on one or more fields (e.g. published, in
moderation, content type, taxonomy, ...etc.
● Exposed Filters
– Any filter can be exposed, so users can select it.
– Very useful feature
– In lieu of searching
Khalid Baheyeldin, Toronto, Mar 13, 2007
Views (cont'd)
● Can be exported
– Easier test ->production move
● Arguments
– Can change the view
– Allows PHPcode for views
Khalid Baheyeldin, Toronto, Mar 13, 2007
Theming views
● Theme wizard built-in
● Provides a good headstart
● Tells you where it goes as a tpl.php
Khalid Baheyeldin, Toronto, Mar 13, 2007
Drawbacks?
● More database queries, means increased load, so
watch out for performance and scalability
● Should not be a concern for small to medium
sites
● Caching in the works
Khalid Baheyeldin, Toronto, Mar 13, 2007
Panels
● Custom grouping of nodes, blocks, HTML and
everything
● Suitable for a site's front page, or section pages
● Provides several pre-defined layouts
● You can add your own layout as a module
(HTML +CSS)
Khalid Baheyeldin, Toronto, Mar 13, 2007
Panels (cont'd)
● Each panel has a URL (like views), as well as a
title and CSS id.
● Content areas
– Predefined in the panel, or module
– Each can contain
● One or more nodes
● One or more views
● One or more blocks
● Custom content (HTML and/or PHP)
Khalid Baheyeldin, Toronto, Mar 13, 2007
Panels Scalability
● Pressflow Preempt
● Caching module for panels.
Khalid Baheyeldin, Toronto, Mar 13, 2007
Seeing it all in action
Let us do it ...
Khalid Baheyeldin, Toronto, Mar 13, 2007
Resources and Links
● CCK
– http://drupal.org/project/cck
– http://drupal.org/node/101723
● Views
– http://drupal.org/project/views
– http://drupal.org/handbook/modules/views
● Panels
– http://drupal.org/project/panels
Khalid Baheyeldin, Toronto, Mar 13, 2007
Resources and Links (cont'd)
● What is CCK, Robert Douglass
– A more technical discussion on the internal of the CCK
http://lullabot.com/articles/an_introduction_to_the_content_construction_kit
● Build a CCK module, Karen Stephenson
– http://2007.oscms-summit.org/node/190
Khalid Baheyeldin, Toronto, Mar 13, 2007
Conclusions
● Questions?
● Comments?
● Discussions?

More Related Content

What's hot

COSCUP 2019 - The discussion between Knex.js and PostgreSQL
COSCUP 2019 - The discussion between Knex.js and PostgreSQLCOSCUP 2019 - The discussion between Knex.js and PostgreSQL
COSCUP 2019 - The discussion between Knex.js and PostgreSQLLen Chang
 
INFT132 093 04 HTML and XHTML
INFT132 093 04 HTML and XHTMLINFT132 093 04 HTML and XHTML
INFT132 093 04 HTML and XHTMLMichael Rees
 
Data strategies - Drupal Decision Makers training
Data strategies - Drupal Decision Makers trainingData strategies - Drupal Decision Makers training
Data strategies - Drupal Decision Makers trainingscorlosquet
 

What's hot (6)

COSCUP 2019 - The discussion between Knex.js and PostgreSQL
COSCUP 2019 - The discussion between Knex.js and PostgreSQLCOSCUP 2019 - The discussion between Knex.js and PostgreSQL
COSCUP 2019 - The discussion between Knex.js and PostgreSQL
 
Performance (browser)
Performance (browser)Performance (browser)
Performance (browser)
 
INFT132 093 04 HTML and XHTML
INFT132 093 04 HTML and XHTMLINFT132 093 04 HTML and XHTML
INFT132 093 04 HTML and XHTML
 
DBTG MODEL
DBTG MODELDBTG MODEL
DBTG MODEL
 
Data strategies - Drupal Decision Makers training
Data strategies - Drupal Decision Makers trainingData strategies - Drupal Decision Makers training
Data strategies - Drupal Decision Makers training
 
Caching
CachingCaching
Caching
 

Viewers also liked

Al Shatrain Contracting Est Profile
Al Shatrain Contracting Est ProfileAl Shatrain Contracting Est Profile
Al Shatrain Contracting Est ProfileHassan Al-Yami
 
Black & Veatch Municipal Smart Grid Survey
Black & Veatch Municipal Smart Grid Survey Black & Veatch Municipal Smart Grid Survey
Black & Veatch Municipal Smart Grid Survey Black & Veatch
 
Surrealist Painter, Jimmy Lawlor
Surrealist Painter, Jimmy LawlorSurrealist Painter, Jimmy Lawlor
Surrealist Painter, Jimmy Lawlormaditabalnco
 
Continuous Monitoring of Harmful Algal Blooms | YSI
Continuous Monitoring of Harmful Algal Blooms | YSIContinuous Monitoring of Harmful Algal Blooms | YSI
Continuous Monitoring of Harmful Algal Blooms | YSIXylem Inc.
 
A Smarter Customer Segmentation Approach for Utilities
A Smarter Customer Segmentation Approach for UtilitiesA Smarter Customer Segmentation Approach for Utilities
A Smarter Customer Segmentation Approach for UtilitiesBlack & Veatch
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialhadooparchbook
 
EASA Part-66 Module11 mcq's
EASA Part-66 Module11 mcq'sEASA Part-66 Module11 mcq's
EASA Part-66 Module11 mcq'sArmghan Saeed
 
SAP services – India GST
SAP services – India GST SAP services – India GST
SAP services – India GST INDUSCommunity
 

Viewers also liked (11)

Al Shatrain Contracting Est Profile
Al Shatrain Contracting Est ProfileAl Shatrain Contracting Est Profile
Al Shatrain Contracting Est Profile
 
Black & Veatch Municipal Smart Grid Survey
Black & Veatch Municipal Smart Grid Survey Black & Veatch Municipal Smart Grid Survey
Black & Veatch Municipal Smart Grid Survey
 
Surrealist Painter, Jimmy Lawlor
Surrealist Painter, Jimmy LawlorSurrealist Painter, Jimmy Lawlor
Surrealist Painter, Jimmy Lawlor
 
Algae
AlgaeAlgae
Algae
 
Continuous Monitoring of Harmful Algal Blooms | YSI
Continuous Monitoring of Harmful Algal Blooms | YSIContinuous Monitoring of Harmful Algal Blooms | YSI
Continuous Monitoring of Harmful Algal Blooms | YSI
 
SAS Presentation
SAS PresentationSAS Presentation
SAS Presentation
 
A Smarter Customer Segmentation Approach for Utilities
A Smarter Customer Segmentation Approach for UtilitiesA Smarter Customer Segmentation Approach for Utilities
A Smarter Customer Segmentation Approach for Utilities
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorial
 
EASA Part-66 Module11 mcq's
EASA Part-66 Module11 mcq'sEASA Part-66 Module11 mcq's
EASA Part-66 Module11 mcq's
 
SAP services – India GST
SAP services – India GST SAP services – India GST
SAP services – India GST
 
Gst ppt
Gst pptGst ppt
Gst ppt
 

Similar to Building drupal-sites-using-cck-views-and-panels

Drupal Content Management System
Drupal Content Management SystemDrupal Content Management System
Drupal Content Management SystemAdhoura Academy
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyMarcos Labad
 
concrete5 from developer perspective
concrete5 from developer perspectiveconcrete5 from developer perspective
concrete5 from developer perspectivemainio
 
Drupal Architecture and functionality
Drupal Architecture and functionality Drupal Architecture and functionality
Drupal Architecture and functionality Ann Lam
 
Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management SystemsMatthew Turland
 
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCRDrupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCRGaurav Mishra
 
Drupal training-1-in-mumbai
Drupal training-1-in-mumbaiDrupal training-1-in-mumbai
Drupal training-1-in-mumbaivibrantuser
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalRod Martin
 
IWMW 1998: Deploying new web technologies
IWMW 1998: Deploying new web technologiesIWMW 1998: Deploying new web technologies
IWMW 1998: Deploying new web technologiesIWMW
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupalmayank.grd
 
DruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cmsDruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cmsWong Hoi Sing Edison
 
drustack a mobile-friendly web content management system (cms)
drustack   a mobile-friendly web content management system (cms)drustack   a mobile-friendly web content management system (cms)
drustack a mobile-friendly web content management system (cms)Wong Hoi Sing Edison
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsMicky Metts
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
10 steps to becoming a panels pro
10 steps to becoming a panels pro10 steps to becoming a panels pro
10 steps to becoming a panels proGreen For All
 

Similar to Building drupal-sites-using-cck-views-and-panels (20)

Drupal Content Management System
Drupal Content Management SystemDrupal Content Management System
Drupal Content Management System
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 
concrete5 from developer perspective
concrete5 from developer perspectiveconcrete5 from developer perspective
concrete5 from developer perspective
 
The Technical Side of Harvard.edu Redesign
The Technical Side of Harvard.edu RedesignThe Technical Side of Harvard.edu Redesign
The Technical Side of Harvard.edu Redesign
 
Drupal Architecture and functionality
Drupal Architecture and functionality Drupal Architecture and functionality
Drupal Architecture and functionality
 
Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management Systems
 
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCRDrupal7 Theming session on the occassion of  Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
 
I <3 Drupal
I <3 DrupalI <3 Drupal
I <3 Drupal
 
Drupal training-1-in-mumbai
Drupal training-1-in-mumbaiDrupal training-1-in-mumbai
Drupal training-1-in-mumbai
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to Drupal
 
IWMW 1998: Deploying new web technologies
IWMW 1998: Deploying new web technologiesIWMW 1998: Deploying new web technologies
IWMW 1998: Deploying new web technologies
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
DruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cmsDruStack- a mobile-friendly web content management system (cms
DruStack- a mobile-friendly web content management system (cms
 
drustack a mobile-friendly web content management system (cms)
drustack   a mobile-friendly web content management system (cms)drustack   a mobile-friendly web content management system (cms)
drustack a mobile-friendly web content management system (cms)
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Yoav Kutner Dutchento
Yoav Kutner DutchentoYoav Kutner Dutchento
Yoav Kutner Dutchento
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal Concepts
 
I Heart Drupal
I Heart DrupalI Heart Drupal
I Heart Drupal
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
10 steps to becoming a panels pro
10 steps to becoming a panels pro10 steps to becoming a panels pro
10 steps to becoming a panels pro
 

Recently uploaded

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

Building drupal-sites-using-cck-views-and-panels

  • 1. Khalid Baheyeldin, Toronto, Mar 13, 2007 Building Drupal sites using CCK, Views and Panels Khalid Baheyeldin http://2bits.com Drupal Users Group, Toronto Tuesday March 13, 2007
  • 2. Khalid Baheyeldin, Toronto, Mar 13, 2007 Agenda ● Introduction ● CCK (Content Construction Kit) ● Views ● Panels ● Demo of all of them together ● Questions, discussion
  • 3. Khalid Baheyeldin, Toronto, Mar 13, 2007 About 2bits.com ● Based in Waterloo, Ontario ● Active member of the Drupal community since 2003 ● Member of security and infrastructure teams ● 24+modules on drupal.org (adsense, userpoints, profile CSV, feedback, nodevote, sitemenu, ...etc.) ● Listed on Drupal.org's service providers section ● Clients mainly in USA and Canada ● Subcontracting development projects ● Customization, development, installation, upgrades, perfor- mance optimization
  • 4. Khalid Baheyeldin, Toronto, Mar 13, 2007 Before CCK ● Drupal core – Has limited number of predefined content types (page, story, blog, forum, book) – Fields are: Title and Body ● Contributed modules – Can define their own types (image, job, weblink, ...etc.) – Programming knowledge needed
  • 5. Khalid Baheyeldin, Toronto, Mar 13, 2007 Flexinode ● First attempt at admin-defined content types, without programming ● Did the job it was set to do ● Scalability and performance issues (joins for every field) ● Will not be available from 5.x onwards
  • 6. Khalid Baheyeldin, Toronto, Mar 13, 2007 Content Construction Kit ● Started by Jonathan Chaefer [JonBob] ● Current maintainers – Yves Chedemois [yched] – Karen Stevenson [KarenS] – Darryl O'Pry [dopry] – Wolfgang Ziegler [fago]
  • 7. Khalid Baheyeldin, Toronto, Mar 13, 2007 CCK features ● More extensible – API to define fields ● Exposes fields to views ● Reusable fields – define a field once and reuse it in many content types) ● Different storage model (see Resources and Links)
  • 8. Khalid Baheyeldin, Toronto, Mar 13, 2007 Fields by modules ● Extensibility means that you can write modules that implement new types ● Examples – date – phone numbers (USA, France) – image – taxonomy – email
  • 9. Khalid Baheyeldin, Toronto, Mar 13, 2007 Theming CCK nodes ● Several ways – node-content_type.tpl.php – contemplate module (web based)
  • 10. Khalid Baheyeldin, Toronto, Mar 13, 2007 Drawbacks? ● Added complexity, needed for functionality (always a tradeoff) ● Some performance overhead (extra database tables insert/select/join) ● Extra theming effort (again functionlity) ● Like with all contributed modules, watch out for longevity of CCK fields implemented by modules
  • 11. Khalid Baheyeldin, Toronto, Mar 13, 2007 Future of CCK ● CCK is destined for core ● Phased approach – In 5.x, we have the ability to create content types, but not fields – Discussed currently in the community – Not likely for 6.x (3 months to code freeze)
  • 12. Khalid Baheyeldin, Toronto, Mar 13, 2007 Views ● Written by Earl Miles (merlinofchaos) ● Really powerful module, allows all sorts of magic ● Customized Node listing – creating custom blocks from any content type – creating custom lists from any content type – On selected fields – Filters – Sorting – Arguments
  • 13. Khalid Baheyeldin, Toronto, Mar 13, 2007 Views (cont'd) ● Basic info – Visibility (by role) – URL ● View type – Page ● Can be list, table, teasers, ...etc. – Block – Provide Menu? ● Headers and footer – Your own HTML or PHP
  • 14. Khalid Baheyeldin, Toronto, Mar 13, 2007 Views (cont'd) ● Fields – Modules can expose fields to views, e.g. image module exposes the image, thumbnail, ...etc. – All CCK fields are exposed, and that is where the power is ● Sorting – Ascending/Descending – On one or more fields
  • 15. Khalid Baheyeldin, Toronto, Mar 13, 2007 Views Filters ● Filters – Can be on one or more fields (e.g. published, in moderation, content type, taxonomy, ...etc. ● Exposed Filters – Any filter can be exposed, so users can select it. – Very useful feature – In lieu of searching
  • 16. Khalid Baheyeldin, Toronto, Mar 13, 2007 Views (cont'd) ● Can be exported – Easier test ->production move ● Arguments – Can change the view – Allows PHPcode for views
  • 17. Khalid Baheyeldin, Toronto, Mar 13, 2007 Theming views ● Theme wizard built-in ● Provides a good headstart ● Tells you where it goes as a tpl.php
  • 18. Khalid Baheyeldin, Toronto, Mar 13, 2007 Drawbacks? ● More database queries, means increased load, so watch out for performance and scalability ● Should not be a concern for small to medium sites ● Caching in the works
  • 19. Khalid Baheyeldin, Toronto, Mar 13, 2007 Panels ● Custom grouping of nodes, blocks, HTML and everything ● Suitable for a site's front page, or section pages ● Provides several pre-defined layouts ● You can add your own layout as a module (HTML +CSS)
  • 20. Khalid Baheyeldin, Toronto, Mar 13, 2007 Panels (cont'd) ● Each panel has a URL (like views), as well as a title and CSS id. ● Content areas – Predefined in the panel, or module – Each can contain ● One or more nodes ● One or more views ● One or more blocks ● Custom content (HTML and/or PHP)
  • 21. Khalid Baheyeldin, Toronto, Mar 13, 2007 Panels Scalability ● Pressflow Preempt ● Caching module for panels.
  • 22. Khalid Baheyeldin, Toronto, Mar 13, 2007 Seeing it all in action Let us do it ...
  • 23. Khalid Baheyeldin, Toronto, Mar 13, 2007 Resources and Links ● CCK – http://drupal.org/project/cck – http://drupal.org/node/101723 ● Views – http://drupal.org/project/views – http://drupal.org/handbook/modules/views ● Panels – http://drupal.org/project/panels
  • 24. Khalid Baheyeldin, Toronto, Mar 13, 2007 Resources and Links (cont'd) ● What is CCK, Robert Douglass – A more technical discussion on the internal of the CCK http://lullabot.com/articles/an_introduction_to_the_content_construction_kit ● Build a CCK module, Karen Stephenson – http://2007.oscms-summit.org/node/190
  • 25. Khalid Baheyeldin, Toronto, Mar 13, 2007 Conclusions ● Questions? ● Comments? ● Discussions?