Isaac wants his web site to have the following features:
Smart has chosen the “AD The Morning After” theme (which is a contribution to the Drupal project) because he loves the design. The front page will feature a teaser for Smart’s profile at the top of the content area, and a list of his most recent blog posts in a block at the bottom of the front page. The final layout of Smart’s web site can be seen in the following screenshot:
Okay, this guy Smart doesn’t appear particularly likeable does he, and isn’t this quite typical of university professors? But let’s put our prejudices aside for a couple of hours and get his work done for him. The major tasks in building the web site for Isaac Smart will be:
In order to create the desired web site, we will be using some essential Drupal modules.
The following optional Core modules will be required:
The following contributed modules will also be used:
Smart’s site is quite basic. The About Me page can be safely created from the Story Content type, and that is what we are going to do. However, to add an element of danger to the project, we will be including a new Content type for his publications, and we will call it just that—”Publication”.
By navigating to the Administer page of the site and then to the Content management section, we will find the Content types link.
If we access this page, then we will see the various Content types listed there. Here, we need to create a new Content type for “Publication”.
To create the “Publication” Content type:
We first need to establish how the content is going to be organized for use on the site. This is quite easy because we have created only one new Content type, named Publication, that will have taxonomy terms—Books and Papers—attached to it. By doing this, we will have set the ground rules for how content will be created and displayed on the site.
Categories or terms may be used to further classify items that, even though they fall under the same Content type, need to be grouped with others with which they bear a close similarity. In this case, Smart’s Publication list includes Books and Papers, which, even though they are both publications, would do well if grouped separately. So we must now create the new categories and establish relationships between these new categories and the new Content type.
Go to the Taxonomy link under the Content management section on the Administer page, and click on it to get to the Taxonomy page. If you have started a new site, then at the foot of this page, you will see a notice that there is no vocabulary available for your new categories. The vocabulary is a term by which a collection of categories (or terms) can be collectively described. In this case, let us create a vocabulary that we will call Publications Type. We will do this by clicking on the Add vocabulary link at the top of the page. This is what we will be entering into the form for this new vocabulary:
The completed vocabulary page is shown in the following screenshot:
On returning to the Taxonomy page, we can see the new vocabulary that we have just created is listed. Now we need to add the terms for the vocabulary. We do this by clicking on the add terms link and completing the form that we will be presented with. At this stage, forget about the Advanced Options link at the bottom, because we only have a single level of terms.
If you click on the list terms link on the vocabulary, then you will be presented with a list of the terms that you have created, in the order that these terms will be presented to Smart. If you don’t like this order, then just drag the ones you want to change to the location that you want.
Now, let us test our content submission form and see how it works. In order to do this, you click on the Create content link (on the lefthand side of your page), and select Publication. You will then get a form, as shown in the following screenshot:
Using this form, Smart will be able to post the details of his many publications to his web site. However, he doesn’t know a thing about HTML (which proves that he isn’t so great after all) and will definitely have problems while uploading images into his posts. So, we will give him an easy way to do this.
Download the IMCE and Image modules. Install and enable them. It is also essential that you have the Upload module enabled. The TinyMCE editor (even though it is not essential) will permit Smart to edit his pages without knowing any HTML. Download the editor, if this feature is required.
Having done this, return to Administer | Content management | Content types, and select the Publication Content type. At the bottom of the page, you will see a new panel for Image Attach settings. Enable Attach images, and now the Publication Content type will be ready to incorporate images. To confirm this, go to the Create content link for the Content type. Near the bottom of the page you will find the Attached images panel, as shown in the following screenshot, where you can upload images for your content. Do the same for the Blog entry, Story, and Page Content types.
If you have configured your TinyMCE editor correctly, then you can similarly post images into the Body of your article by using the image upload function in TinyMCE.
We will also ensure that the Attach images functionality has been enabled in all of the other Content types. Then, in the Workflow settings for each Content type, deselect the Promoted to front page checkbox, or else you will end up with a very unruly front page display.
The About Me page, as we have decided, should really be quite straightforward and will be created from the Story Content type, which is recommended for content that is static.
Tips and traps
We have used this approach because Smart is the only person having a personal profile on this web site. Otherwise, it will not be adequate, and we may have to call up some other modules, especially the CCK module, which will enable us to create new form fields to make submissions more intuitive (for example, to present defined fields for name, education, interests, and so on).
I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…
Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…
Once we learn how to deploy an Ubuntu server, how to manage users, and how…
Key-takeaways: Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…
While developing a web application, or setting dynamic pages and meta tags we need to deal with…
Software architecture is one of the most discussed topics in the software industry today, and…