Back to the front page
Drupal set-up and modules for a corporate website
February 16th, 2008
Filed under Drupal
(Part 2 of a series in setting up a corporate website with Drupal. Part 1 Part 3 Part 4))
The basic plan for the site is to have some static content pages with company information, supplemented by a hierarchical set of product pages where you can view lists of products under each product type, or download brochures and more information from individual product pages. The products are of various different types, with each product belonging to one type.
Before doing anything, I enabled Clean URLs in the Administration/Site configuration tab, just to make the urls all semantic and search-engine friendly. I also switched on the Path module which lets you create a list of semantic url aliases – having a mysite.com/about address is much friendlier than mysite.com/node/3.
At this stage, I went ahead and created the static content – the text for the homepage, About, Contact etc. I used the default Page content type, creating a nice url alias for each and setting up each page with a Menu entry with some basic hierarchy. At this point, the static content just needs to be styled and themed – the fundamental information is in place and can be accessed through the menu.
The more interesting challenge was to create the Product content in a structured way, leveragaging Drupal’s vocabularies to create relationships between products and types of products. This information can then be use to generate product lists dynamically.
To create the actual products, I made a new content type, Product, really to give me an easy way to identify all the products rather than searching by category. I left the options for this type as Published with comments disabled.
Then I created a Product Category with a single hierarchy, where each child term has only one parent. Each type of product can be a sub-type of just one other type. (Single hierarchy doesn’t mean, as I initially assumed, that there is just one level of inheritance.) I set this category to apply to the Product content type. Here I created all the different types of products and the relationships between them.
The products are going to have pdf brochure files associated with them. To activate attachments, I needed to enable the Upload module, which is part of Drupal’s optional Core modules. Then attachments could be turned on in the Product content type options. At this point I also checked the Site configuration/File system options, making downloads private so that I could control user access if necessary.
Now I could start to enter all the product data, using the Product content type and choosing the correct type of product from the Product vocabulary. In this case, there was a description and a brochure for each. (If the data had been more structured, for instance with dates and product codes, I would have used the CCK module which allows you to add fields with data validation to content types. But that’s for another day.)
With all the product data entered, I just had to find a dynamically generated way to expose that information to users. Next post: Taxonomy and Views!
zoejessica.com » Blog Archive » Two ways of creating a product list commented on February 16th, 2008 at 5:41 pm
[…] (Part 3 of a series on setting up a corporate website in Drupal. Part 1 Part 2) […]
zoejessica.com » Blog Archive » Choices, choices commented on February 17th, 2008 at 9:15 am
[…] 1 in a series about setting up a corporate website in Drupal. Part 2 Part 3 Part […]
zoejessica.com » Blog Archive » Generating aliases automatically in Drupal commented on March 9th, 2008 at 8:23 am
[…] 4 of a series on setting up a corporate website in Drupal. Part 1 Part 2 Part […]