As in the past weeks, you will engage in a number of activities. The activities that you will have to work on may not fit well within the web site that you are planning to develop.
Please work on all the activities, as they are meant to familiarise you with Drupal features, but keep in mind that you might have to rever some of the changes that we will be working on today after the class.
If at any point you become stuck with your development, you can always drop all your tables ( = content) and restart the web site. While a bit drastic, it might be required when you are walking your first steps with Drupal.
As your development progresses, you should be making regular backups of your web site (both files and database). Use WinSCP to backup the files and phpMyAdmin to backup the databases (or select any suitable Drupal modules).
Please remember that altough there are a number of on-line sources to learn how to use Drupal, it will be much easier if you start from one or more of the following books:
They are all available in our library.
You should use on-line resurces and these slides to comlement your study - not as a sole source of knowledge.
Last week you have seen how to create basic content with Drupal (e.g. forum topics); today we'll start by looking at how to create Drupal pages and articles.
A Drupal site can contain many types of content (e.g. pages, news, polls, blog posts). In Drupal, each item of content is called a node, and each node is based on a single content type.
The most basic content types are the article and the basic page:
You can customise content types through the structure menu in your Drupal installation:
You can customise content types by adding extra fields.
The most common fields are:
The Article content type includes the fields Term reference, Long text and summary and Image.
The Basic page content type includes the field Long text and summary.
Let's review what we have just seen by creating a new Drupal Article and adding a black cat image to it. You can get the image from wikipedia.
What if you want to add more than one image?
Update the Basic page content type to include an image field; start from
Create a new Drupal page and add a black cat image to it.
You may have to revert this change later on for your project(s).
Are you stuck? Refer to the documentation.
Drupal supports 3 default text formats:
They can be customised in
Under normal circumstances, you would want most of your users to post only content in Filtered HTML, but you may want to allow the developers to use Full HTML.
This can be done (for example) by allowing authenticated users to create Articles, but not Pages, and allowing Full HTML only for pages.
If you enable the PHP filter module, you can allow users with some roles to include PHP in their nodes.
What are the advantages and disadvantages of this?
What precautions should you take?
Taxonomy is the practice and science of classification.
In our context, taxonomy refers to a classification of content inside Drupal.
You can customise your taxonomy through the structure menu in your Drupal installation:
On my personal web site I use a number of vocabularies to tag my content:
My places vocabulary includes the places that I mention in my blog posts or pages. Here is a shortened version of it:
Create (on paper) a suitable taxonomy (at least 12 terms) for a domain of your choice, to be used to tag your Article nodes.
Discuss it with the classmates beside you and then:
You can build complex, hierarchical taxonomies with Drupal - and update them as you need.
As we have seen earlier on, any content type can be customised to include images. The next slides will show you how to create more advanced content.
The WYSIWYG module can be used to integrate a WYSIWYG editor into your web site.
In the past weeks we have seen how Drupal can be extended by installing new modules. We are now going to see how to do it.
There are different ways to install modules - the symplest is to:
ites/default/modules under your local Drupal installation. All your modules will reside there.
If there are any errors, read the error description and try to understand what it means. Use search engines if you find yourself lost.
You you cannot see any errors, consult the Drupal log.
Following the instructions in the previous slides, download, install and the WYSIWIG module. This require some post-installation configuration - follow the steps on screen after enabling the module.
Download an install TinyMCE (use version 3.5.x, not any version in the 4.x branch) as the default editor for the WYSIWIG module.
Review the Content authoring page (
/?q=admin/config/content) and customise your Wysiwyg profiles, adding a suitable set of buttons and plugins for the different text formats.
If you do not have it yet, you need to create a folder named
sites/default/files/images. This is where you will save all your images; upload a few images to the folder using WinSCP.
Try the WYSIWIG module by creating a new Basic page with at least 2 images.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License