Introduction to Drupal

From DevSummit
Jump to: navigation, search

session notes: drupal session notes, Nonprofit Tech Summit 12

What is drupal? Free software content management system: a way of getting content on the web, editing it easily. to maintain content you need only a web browser.

Interface is very customizable, even different users or groups of users can be given different options/displays for the content and permissions for what they can do.

Drupal is built in PHP (programming language) and uses a database (mySQL most often)

How does it work? Core software: main drupal package and basic infrastructure of what the CMS is (users, basic content). Drupal 7 is the current version; drupal 6 is still in use. Drupal supports the current version and on version back, so when drupal 8 is released 6 will no longer be supported.

Drupal uses modules (code that add functionality to the system, similar to wordpress plugins). Modules are made by anyone in the community and distributed on the drupal.org site. Module development is less centralized than Drupal Core. Anyone can make or use a module and report problems and feature requests. Module dev is controlled by a maintainer.

Drupal 7 is where most people's work is going; drupal 6 is still supported but new features are being added most often to 7 and not 6.

Drupal themes are sets of code/files that define how the site looks. Themes are made up of css, html, and code files that use one or another framework, most often phptemplate.

There are a number of themes in core, and lots of contributed themes that you can work from to make your own theme/design.

Drupal outputs tons of stuff (menu, content, variables and other things) in php. The theme takes that, and using php puts it in the right place for your design.

One example, very frequently used is the zen theme, which can use subthemes that are custom to your needs.

Drupal building blocks/vocabulary:

Node: a node is the basic piece of content (body, title, username of author, etc.).

Content type: nodes are a specific instance of a content type (blog, recipe, page, story); each content type can have its own set of fields in addition to the default. Drupal comes with 2 content types by default, page and story/article. The base types are the same but having two allows you to treat them differently (one can have comments, one is for static content for example).

Each content type can have its own look and feel/style.

Important thing to keep in mind when building a drupal site is the content types and what fields you need for each.

Fields can be set to be optional or required depending on the needs of the site and design.

Drupal (as most CMS tools) allows you to keep content looking consistent. Titles always look like they should, this allows site content maintainers to focus on content and not layout.

Drupal is different than wordpress; not better but different. Wordpress allows for people to sell plugins, drupal takes a strict view of the GPL and there are very few if any modules that require pay.

One of the most popular and important drupal modules is called Views. It allows you to create listings and aggregations of content based on various factors. (calendar display, listing of past events, etc.)

Views allows you to, via a graphical/web interface, build complex SQL queries and display the results in different formats.

Drupal has a complex system for classification of data. The drupal taxonomy system is broken into vocabularies and those are made up of terms. Type of resource would be a vocabulary and the terms in that vocabulary might be "report," "factsheet" or "know your rights flyer"

You can display content based on the tags/terms/vocabularies assigned to them.

Modules have pages where people can submit issues/problems/requests and that can be useful to vet a module's quality and sustainability. One of the strengths of drupal is the centralization of distribution via the drupal.org website. You always know where to go to report a bug and how to tell how responsive maintainers are to reports/requests.

Free software in general is good at creating "competitive transparency" and a new culture of collaboration.

There are also distributions of drupal, which are combinations of drupal and a set of modules which allows for easier beginning of use of drupal for different use cases (pressflow for publishing, open atrium for issue tracking, open outreach for nonprofit orgs). This allows for you to start with a common scaffolding.

the flexibility of drupal means that most drupal sites are very different where wordpress has fewer options which means more similarity. There are 10 ways to do anything in drupal; some better than others. When building in drupal you need to keep in mind that you have to upgrade every few years as versions are no longer supported. Drupal core tends to be easy to upgrade but the contributed modules can have difficult upgrade paths (and this should be taken into consideration when deciding which modules to use and even if you should use a module or find a way to do it using what you already have).

Session concluded with Jack doing a demo/walkthrough of an existing drupal site to give people a better idea of what some of the concepts discussed mean.


Ericfg 11:07, 16 November 2012 (CST)