I would like to receive feedback on a possible solution I've worked out for the following problem.
We are in the process of building a site which functions like 'yellow pages': a directory of businesses in Vlaanderen, Belgium. Our first iteration is visible at http://www.zoekwww.be (Dutch only but that probably doesn't matter). The site is loaded with banners that follow quite complicated rules for which we wrote a special module. Some banners link to the website of the company, other banners link to a large banner that is presented in the central area of the site. We want the facility that companies can provide their own information instead of the large banner, e.g. opening hours, special activities, pictures, detailed descriptions and so on. And we want to give companies the possibility to choose between different formats: templates that define what content is presented and how it is presented. A one-page website within this site, so to speak.
In Drupal terms a template is something that defines the presentation of one or more elements (pages, blocks, node etc) but here we want templates like we have in office programs: it gets you started but you can override if you want to. I've searched for possible answers (both on drupal.org and the web) and found none. Simply giving users a full html wysiwyg editor is IMHO not a good idea: wysiwyg comes with a lot of headaches and I do not consider it user friendly (I've seen lots of people wrestling with Tiny, FCK or whatever).
My ideas on how to approach this may be of interest to others and I would like to receive feedback if my ideas are sound, suggestions in other directions.
What I propose to do is:
- make several cck types to provide for different kinds of information to present
- add a select field with some predefined stylings, related to different style sheets for the content type
- build a template specific for that cck type which includes a switch based on the select field to specify the css to use
With this I can let the user make some elementary choices in colors, fonts and so on.
Enhancemens of this approach could be:
- use pageroutes to organise cck types that act as small components in the page to build
- integrate with the color module so a user has more control over colors
- derive a full html page that can be edited afterwards
Has anyone tried this already - or any other ways to go about this?
If this works out well I will make a contribution to the handbook.