Introduction

To follow up the plan of IT to provide a Content Management System (CMS) service based on Drupal, I started some usability investigations.

I didn't followed a precise plan. The initial idea was to test if it is possible (and with how much work) to accomplish some basic tasks.

A general requirement is that everything should be achievable with minimal administration privileges (no root access to the machine) and without custom development (we do not have the man-power to develop Drupal modules for our use cases).

For the testing I used the TurnKey Drupal 6 appliance on a VirtualBox instance configured with host-only networking.

Software Projects Pages

To foresee an integrated LHCb web site based on a CMS it is important that the CMS can be used to host the software projects pages.

Those pages are currently generated from a collection of PHP scripts. There is a front page independent from specific releases, and pages specific to each release. To create a new "project release" set of pages it is enough to provide the following informations:

  • project name
  • project version
  • description of the release
There is also a special field that is used to group versions by some properties (e.g. data type compatibility).

Requirements

  • Generate all the required pages dynamically providing the minimal requested information
    • project name
    • version
    • description
  • Add a new release from a script (bypassing the web interface)

Extra features

  • RSS

Implementation

Modules

Step by Step

  • Create a new type of entry (http://drupal.local/admin/content/types/add)
    • specify sensible values for
      • Name (Project Release)
      • Type (release)
      • Body field label (Description)
    • select Automatically generate the title and hide the title field and define the value of the generated title as
      [field_project-raw] [field_version-raw]
    • uncheck the Promoted to front page checkbox
    • optionally disable comments
  • Edit the fields of the new type of entry (http://drupal.local/admin/content/node-type/release/fields)
    • add the field called Project (field_project) of type Text and widget Select list, mark it as required and fill the list of allowed values with the project names (to be updated if a new project is added)
    • add the field called Version (field_version) of type Text and widget Text field and mark it as required
  • Create automatic alias ruled for the new type (http://drupal.local/admin/build/path/pathauto)
    • in Node path settings set the value for Pattern for all Project Release paths to
      releases/[field_project-raw]/[field_version-raw]
  • Create a view to list the releases (http://drupal.local/admin/build/views/add)
    • set the view name to, e.g., releases and the view type to Node
    • in Basic settings, set the Row style to Node and Use pager to Full pager
    • add Content: Project to Arguments, setting Title as
      %1 releases
    • add Node: Post date with descending order to Sort criteria
    • add Node: Type to Filters, selecting Is one of and Project Release
    • create a new Page type display with the Add display button
    • set the Path in Page settings to
      releases/%
    • create a new Block type display with the Add display button
    • add Node: Post date with descending order to Sort criteria
    • in Basic settings, set Title to Recent Releases, Row style to Fields, Use pager to No and Items to display to 5, checking the you clicked the Override button when setting the new values
    • add to Fields:
      • Node: Title removing the Label and checking Link this field to its node
      • Node: Post date removing the Label
    • create a new Feed type display with the Add display button
    • set the Row style to Node
    • set the Path in Page settings to
      releases/%/rss.xml
    • set Attach to selecting Page and Block
    • save the view with the Save button
  • Create an alias (http://drupal.local/admin/build/path/add) with Existing system path set to releases/all and Path alias set to releases
  • Create a template for the "Project Release" nodes (http://drupal.local/admin/content/node-type/release/template)
    • in the Teaser box, check Affect teaser output and set the Teaser Template to
      <?php print $node->content['body']['#value'] ?>
      
    • in the Teaser box, check Affect teaser output and set the Teaser Template to
      <?php
      print $node->content['body']['#value'];
      print '<br/>';
      print '<a href="http://lhcb-release-area.web.cern.ch/LHCb-release-area/docs/' . strtolower($node->field_project[0]['value']) . '/' . $node->field_version[0]['value'] . '/index.html">Documentation</a>';
      ?>
      
The new release can be created with (http://drupal.local/node/add/release).

Further considerations

Several other tunings are possible: the format of RSS, the automatic publishing, ...

In this setup, few limitations are still present:

  • The value of the version field should be validated. There are several possibilities, but not one final answer:
  • The pages with the release details are not easy to introduce.
    • The first problem is that to be able to react to a URL displaying a page without having an associated node (and node type) requires a custom made module, which may not be possible to install in a service provided by the IT.
    • If it is possible to install custom modules, it should be easy to extend the page example module (page_example_baz) in the examples project. (Attached a minimal Drupal6 module for packages and release.notes, with fake content: release_details.tar.bz2)

The possibility of creating entries from a script has not been tested, but should be easy using the "Blog API" module (part of Drupal Core in version 6 and available as a module in version 7). Another alternative can be to use Services.

The project front page should not be very difficult, since it's concept is at the base of any CMS. It should be understood how the layout of the page could be tuned depending on the current node, so that the Gaudi front page contains a block with only the releases of Gaudi (see this post).

An alternative implementation can be based on the Taxonomy module, to be investigated.

-- MarcoClemencic - 15-Jul-2010

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatbz2 release_details.tar.bz2 r1 manage 1.9 K 2010-07-18 - 22:06 MarcoClemencic Example of a minimalistic Drupal6 module for displaying project release details.
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2010-07-18 - MarcoClemencic
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback