Sometimes it can be a challenge to explain to a client the practical benefits of moving from a static hand coded website to a content management system, such as Drupal. Phrases like "the content is seperated from the styling" can make their eyes start to glaze.
So I was pleased when a practical example presented itself. This client's website had a single page that listed about 300 quotations grouped into (collapsed) headings such as Anxiety, Courage, Belief etc. My first (lazy) thought was to copy and paste the current code into a single drupal page and move on but decided to use it to show what can be achieved with Drupal.
I created a Taxonomy called Quotations and used the headings above as terms eg
Belief
Bible
Christianity
Call of God
The Cross
Anxiety
Courage
HopeIt became clear that I could create hierachy that would help with searching and organisation
Belief
-Christianity
--Bible
--Call of God
--The Cross
Emotions
-Anxiety
-Courage
-HopeI created a new content type quotations with additional cck fields
► taken from [Text] eg Imitation of Christ Book 4 (13) page 230
► Author [Text] - the quotes author (would probably not use this in future as can be confused with node author)
► date [Date] - granularity set to just year
The next challenge was the node title, I used http://drupal.org/project/auto_nodetitle to hide the field from the content creator and create it by combining [term] by [field_author-raw] eg "Inspiration by Tolstoy". This caused slight issues because the title gets created before the taxonomy is saved so I used Rules and actions as outlined by dreeds http://drupal.org/node/373978#comment-1654702 to solve the issue.
I then began the task of creating the new nodes, I did look at the possibility of turning it into a csv file and bulk importing but the original text just wasn't consistent enough.
It quickly became apparent that most quotes were referenced from books so I explored and incorporated http://drupal.org/project/amazon as a new cck field. This gave me a small thumbnail of the book next to most quotes
A typical page now looks like the example at the top of this page
Having created the first 50 nodes I was keen to see how best to make the results available to the public. I started with a page view [allquotes], table style of all quotes and fields Title, Amazon (small image) and Body (the quote itself). I then cloned this twice to create subsets for Taxonomy (with depth) for Belief and Emotion, then made all these available via the superfish dropdown menu (see opposite)
http://drupal.org/project/views_random_seed provided block for frontpage and relevant other pages that showed a random quote each time the page was visited.
http://drupal.org/project/node_quick_find was used to provide a block (limited to quotation content type) containing an auto-complete field which matches on the node title.
Finally Text such as
The quotations are many and varied including some by Tolstoy"can be replaced with
The quotations are many and varied including some by Tolstoy"ensuring that as future quotes are added they will be picked up.
http://drupal.org/project/linkfilter
The client was extremely pleased but the key thing was that by showing him how the technology could show the same information in more dynamic and useful ways it has inspired him to use and add to his website with renewed enthusiasm - which has got to be a good thing.
Although only a small example little of this would have been possible without the generous contributions of the Drupal community so thank you all.
Regards
Joe
