Web Development using Drupal CMS – Blocks, Categories, Creating SEF URLs and Customising
Drupal is another Content Management System which is also very popular and used to develop web sites which
require a large amount of interactivity like forums and blogs. In fact Drupal has built in Forum, Blog as well as Comment modules as optional Core Modules which
makes it an ideal option for development of your forum or blog.
Drupal allows the greatest degree of customisation among the popular
content management system as PHP code can also be entered along with HTML in the required web pages. The look and the feel of a Drupal based site
can be changed via "themes".
Drupal Content Management System – Blocks and rendering of Content
Although Drupal is best suited for websites requiring a high level of
interactivity they can also be used equally efficiently for general dynamic sites as well as ecommerce websites.
On the left is shown the view for the a typical Drupal web page. The drupal page just as in the case of many other content management systems is made up of blocks.
These blocks are boxes of content that can be rendered in specific areas of your page as specified by their position in the theme (website template). The display of a particular
block on the various pages of the site can be specified in Administer > Site Building > Blocks .
When the full list of blocks is displayed, we can select the region on the page
where the block is to be displayed as well as the weight (the order of display in that particular region). If we wish to specify the pages where the block should appear we can can click on configure
against the desired block and in the displayed page specify our preferences.
Enabling Meta Tags and Search Engine Friendly URLs in Drupal
Normally the URLs in Drupal are of the form http://www.mywonderfulsite.com/?q=node/1 . When clean URLs is enabled we get URLs of the form http://www.mywonderfulsite.com/node/1. Fully Search
Engine as well as vistor friendly URLs URLs can be obtained by the use of SEF extension Pathauto. This module generates a SEF URL from the category
and the title of the page.
For example if we have a page with the title Dolphin Trips at Palolem Beach in the category Goa Sightseeing Tours, the URL generated by pathauto
will be of the form http://www.mywonderfulsite.com/goa-sightseeing-tours/dolphin-trips-palolem-beach.html.
Pathauto removes punctuation marks as well as all unnecessary words like an,as,at,before and many other words as
well as words added by you to this list whicle creating the URL. The general format of the URL as well as other settings for pathauto can be specified by you in Administer > Site Configuration > Pathauto. In
ver 6.x all sef settings are under Site Building > URL aliases > Automated alias settings. In case we are not satisfied by the automatically generated URLs we can manually specify the URL for each page.
Facility for adding Metatags to each page is not available in Drupal. This functionality has to be enabled by installing a module called Metatags Nodewords.
On the settings page we can specify the tags
to be shown on the edit form displayed on each page of content while creating or editing. We can also specify the tags to be output on the head section of the HTML pages (web pages).
We can also specify the front page tags in this section as well as default tags.
The settings for Metatags can be specified by you in Administer > Site Configuration > Meta tags. For 6.x version it is Administer > Content management > Meta tags.
Classification of Content in Drupal
By default we have two types of content in Drupal i.e. Page which is for static content and Story The content that we wish to have on our site can be classified by means of taxonomy. We can create categories and vocabularies by
We can define vocabularies with the help of the taxonomy module. A vocabulary consists of a set of categories which are used to classify content. The module supports hierarchical classification,
however for our purpose, it is best to have the pages classified under the different categories and not to have subcategories.
For example we can have a main category (vocabulary) called
Goa Heritage and Culture and under it we can have two categories Goan Culture and Goan Recipes. Our content called stories (as they are categorised) are classified under these categories.
Adding and Editing Content
In Drupal WYSIWYG editor is not present by default and has to be enabled by downloading and configuring extensions. By default, there are three modes for entering and editing content.
The default mode is filtered HTML. The other modes are full HTML and PHP code mode which enables us to post PHP code.
The PHP mode is useful in the development of web sites which require a large amount of interactivity. It enables us to customise the site fully to our liking.
The absence of a WYSIWYG editor makes it much more difficult for a person with no knowledge of HTML to maintain and edit the content of a Drupal based website.
Other Features of Drupal
A full fledged search facility which enables quick searching of all content is present. Also a
the Throttle module handles the auto-throttling mechanism, to disable certain modules temporarily to reduce server load when the
site gets extremely busy. There are several other extensions available for Drupal which can add a lot of extra functionality to the website.
The anonymous users or the users not logged in have typically only viewing priveleges. Drupal however cannot restrict access to selected pages of the site to unregistered (anonymous)users.
We have to allow access to all pages or no pages of content for unregistered users.
Features of Drupal Content Management Systems (CMS):
- Runs on Apache web server with PHP and My SQL.
- Ideal for development of websites which require a large degree of customization.
- Facility to add or edit content via a simple browser based interface.
- Support for unlimited menus, sections and categories.
- Menu Items can be ordered as per requirement.
- After installing and activating an extension Pathauto, a Drupal site can be made to look like a Static site (HTML site) with Search Engine Friendly URL's. Page names as well as titles can be fully customised.
- Look and Feel of your site is fully customisable via "Themes".
- Generates very clean code. Hence pages are generated relatively fast.
- Customised page titles can be used for each page so as to be appropriate to the content contained in that page.
- Customised page descriptions as well as keywords can also be used if required by you by installing Nodewords Metatags extension.