Drupal Camp Toronto 2007 - Part 1

These are my notes from the first day at Drupal Camp Toronto. It's a two day event (May 11th and 12th) that covers some of the basics, as well as some of the advanced things, you can do with Drupal. Read on for details about the three sessions I attended today...

CCK, Views and Panels

This session covered the combination of CCK, Views and Panels. These three modules are all you need to create the majority of dynamic data driven Drupal-based websites.

CCK is the Content Construction Kit. You use CCK to create new content types. A content type could be a blog entry, a news story, a static page, any thing where the user will be adding data. You then add fields to this content type. These fields could be anything from a sample image, a number describing something, a date, anything that helps describe your data. You can categorize the fields into groups, giving organization to the fields. Once you have all the fields in your content, you can then edit the display options, allowing some fields to be visible when its in the teaser, and some to be visible in the body.

Views allows you to create different ways of viewing groups of content. It could be used to see all new songs on a website, view all data with one criteria, etc. You create a new view, edit what types of content will show, to what type of user, change on what conditions will the nodes of content show, choose which fields will be visible in the view, and more. You can also export the view for easy testing and production and import it for copying existing views and testing new ones.

The Panels module allows custom layouts of nodes, blocks, HTML and everything. You can group a view into a panel, allowing some of the nodes to display on the left side, while others are displayed on the right. Once you create a custom panel, you can add nodes, blocks, or even a view to have it display anything you want.


AJAX (Asynchronous, Javascript and XML) is a group of technologies that communicates between the user and the server without reloading the entire page. An example is when a user clicks on something and then it downloads some data from the web server and displays it on the page without a refresh. You would use it because it seems faster, it's less web-like (more like a desktop application), and it's free. Javascript isn't AJAX, AJAX only refers to the part that retrieves data from the server.

Putting Javascript into Drupal requires you to call the drupal_add_js function. Be sure to use drupal_get_path function within your module to include the correct JS path: drupal_add_js(drupal_get_path('module', 'mymodule') . '/js/myjavascript.js');.

You can put inline Javascript directly into the page by calling drupal_add_js('$(document).ready{alert("yo");}', 'inline');. To add values to be used within Javascript, you have to call drupal_add_js(array('flavour'=>'vanilla'), 'setting');.

Drupal 5 comes with jQuery in core. It's a very powerful, very slime Javascript library. It gives you some very desktop application like functionality, like autocomplete, events, the ability to hide and show information, and reload data directly from the server. The first time you call drupal_add_js, jQuery is loaded with the page load.

Advanced Drupal Theming

Corporate branding is important for market share, brand recognition and company notoriety. Drupal theming provides intrinsic extensibility, user friendly environments, and creates the image of your company. The way you theme your website is the way people will see the company.

How do you create the image? Brainstorm: What is the product? Who's our audience? Who are the stackholders? What adjectives describe us? Use that list to create a line of fire.

Develop the site around the logo of the company. They should see the logo first, and then the website. Use photoshop to create a mockup, and then create the site using CSS. Stay away from table layouts, tables weren't created to host design. Design for your clients, not your employees. Make sure to stick to web compliance.


It was a great first day, and I'm really looking forward to the sessions tomorrow. They'll include module development, CRMs and about why Drupal is a good choice for big companies. Stay tuned!