Corporate Manual: Wiki-Style
We’ve been using Basecamp from 37signals for quite awhile now for client communications and project management. We soon started to use it to store and manage our employee manual too. However, there are certainly limitations, as you can only have one level of categorization and hierarchy and you can’t change the order in which they appear.
So we decided to “port” the manual over to Drupal and write a blog post about how we did it. This post will cover how to setup a manual for both your clients and your employees using a combination of the book module and wikitools. We will also go into how to setup notifications and some other helpful related tools.
EDIT: Please note that we are currently using Drupal 5.x for our production site as we are waiting for stable releases of CCK and Views before upgrading. However, this tutorial is not dependent on either of those modules and this may very well be possible with Drupal 6.x though there may be some differences in the modules.
Step 1: Installing the Modules
You will need to make sure the following core modules are turned on:
You will then need to download and install the following modules from drupal.org:
- Book Access (Set specific permissions per book so that clients can see the Client Support book and the Staff can only see the Staff Handbook.)
- Comment RSS (Subscribe to comments on the site via RSS)
- Default Filter (We can use this to set the default filter for certain content types and roles to be different.)
- Diff (Compare revisions)
- Freelinking (Similar to the linking syntax of Wikipedia)
- GeSHi Filter (Allows for code highlighting. NOTE: You will need to download and install the GeSHi source code. See the modules README.txt for more info.)
- HTML to Text (Required for Subscriptions)
- Mail Editor (Required for Subscriptions)
- Pathauto (If you don’t already have it, you need it anyway.)
- Table of Contents/Headings anchors (Allows us to add a Table of Contents for a given page based on the headings similar to Wikipedia)
- Talk (Puts comments for a node on a separate tab called “Talk” similar to Wikipedia)
- Textile (An all around easy to use and great text markup language, used by 37signals in Basecamp)
- Views (Not necessary for this project, but it makes it easy to make lists of nodes.)
- Wikitools (The power behind all the wiki functionality we will be using.)
- Subscriptions (This will allow staff to subscribe to specific sections of the Staff manual. It can be configured per user in very specific ways. NOTE: We only need to enable Content Subscriptions, Subscriptions, Subscriptions Mail, Subscriptions UI, Taxonomy Subscriptions)
Step 2: Setting up the Book Content Type
First, we will want to make some changes to the Book content type settings.
- Go to admin/content/types
- Find the type “book” in the list and click “edit” to the right.
- You may want to rename the Book content type to something else, we called it “Manual Entry” as that best suited this scenario. You’ll probably want to change the description as well so it makes more sense for your situation.
- Under the “Workflow” fieldset make sure that “Published” and “Create new revision” are checked and the other options are not.
- For our needs we disabled commenting by default. For now, we don’t need clients to be able to comment on Support pages and so we will turn it on for staff handbook pages on a case by case basis. You may decide you want them on by default.
- If you have enabled and installed the “Talk” module then there will be an additional check box that says “Display comments on separate talk page”. Make sure to check that as it will come in handy later.
Step 3: Configure pathauto settings for books
Let’s not forget to configure pathauto for books before we go and create the book pages so that we can save ourselves the trouble of updating the paths later on.
- Go to admin/settings/pathauto
- Under the “Node path settings” find the field “Pattern for all Manual Entry (Book) paths” (It will be named whatever you called your book content type)
- We set this to [bookpath-raw]/[title-raw] which is the best format for a book page because the hierarchy of that page will be represented in the URL like so: “handbook/maintopic/subtopic”.
Step 4: Create the Client & Staff Manuals
Now that we have the content type configured the way we like it and the paths set up nicely, it’s time to create the actual books. You do this by creating the first page in the book and setting its parent as the top level. We’re going to create two books. One called “Support” for our clients and another called “Handbook” for our employees.
- Go to “Create Content” > “Book” or whatever you may have renamed it to (node/add/book)
- Type in the title of this book, in this case we’re calling it “Support”
- Set the parent to the top level (which is the default)
- Add in some content, I suggest adding an overview of what the book contains and how to use it.
- Repeat this for the second book which we’ve called “Handbook”
- In addition we’ve actually explained about how to use the Wiki features of the handbook to our staff.
Step 5: Setting Permissions
In addition to the two default roles anonymous user and authenticated user we have three roles: super (has access to everything), admin (has access to day-to-day site administration functionality), staff (see below). I’ll let you decide what roles you want to use on your site, but I would suggest that you have at least one that is similar to our “staff” role. The staff role has the following permissions checked:
- Book Module: create book pages, edit book pages, edit own book pages, outline posts in books, see printer friendly version
- Comment Module: access comments, post comments, post comments without approval
- Node Module: access content, revert revisions, view revisions
- Search Module: search content, use advance search
- Subscriptions Module: subscribe to content, subscribe to content types, subscribe to taxonomy terms
Once those permissions are set, head over to admin/content/book. You will now see the two books that you have created. Optionally, you can click on “outline” and it will show you all the pages of the book and allows you to easily edit the titles and order them. Not too exciting since we only have one page each. For now you can ignore this and click on “Access control” tab (admin/content/book/access). This new tab is provided by the “Book Access” module we installed earlier. We’ve specified that everyone can view the Support book but only admin and super can edit/delete pages. For the Handbook we’ve specified that only staff, admin, and super can view/edit the book and only admin/super can delete pages. Note that I didn’t allow staff to delete pages. This is because there is no “undo” for deleting pages and so we need to have a certain level of safety.

Now that we’ve given access to users, we need to put it somewhere they can find it. You can do this by editing the menu settings of the two book pages you created and specifying where you want them to appear.
Step 6: Setting up the Wiki Functionality
Now we have the basic book functionality setup we need to add in the wiki functionality that will help to make this more dynamic. The great thing about wikipedia is the way that it’s deeply linkable, collaborative, and constantly in flux. This meets the needs of our company manual well.
We previously installed the wikitools module, so let’s start configuring it. Suprisingly there isn’t much we need to do:
- Go to admin/settings/wikitools
- You have the option to specify a wiki main page, but since we are using the book module for everything I am going to set the “Wiki Path” and “Title of the main page” to nothing/blank.
- We only need the wiki functionality for our manual so under wiki node types I will only check off “Manual Entry”
- Under Options I have checked off the following “Node Creation”, “Node Search”, “Automatic Redirect”, “Unique Title”, “Treat underscores as spaces when looking for node titles”. You can read more about what each of these functions does exactly, right beside the check box. This is really the meat and potatoes of what wikitools does. Your settings may differ from ours of course.
- I kept “Hijack freelinking filter” as checked because we will be using the freelinking filter for the wiki links and we want to make sure that wikitools is used when a wiki page does not exist.
NOTE: There are other wiki filter formats out there, like PEAR Wiki Filter, which allow you to use various markup languages such as MediaWiki. I chose to just use the freelinking module because our staff was already used to using the textile markup language so I didn’t want to introduce something new.

Step 7: The Wiki Input Format
Setting up wikitools alone doesn’t do much though. You really need to have an input format to see the fruit of it. I’m going to walk you through the set up of the input format that we have used. You’ve already installed the necessary modules in the first step of this article, so we can get started configuring them.
Code Highlighting (Optional)
This step is optional, and only recommended if you believe you will be including code snippets throughout your manual. Since we’re a web development company, this feature really makes sense for us.
To follow along you will need to have the “GeSHi Filter” module installed as well as the GeSHi Source Code.
- Go to admin/settings/geshifilter
- I’ve kept most of the geshi settings as they are by default except I have changed the following. I’ve set:
- “Default highlighting mode” I set to “Drupal 5”
- “Default line numbering” I set to “normal line numbers”
Freelinking
- Configure the freelinking module by going to (admin/settings/freelinking)
- See my settings below. Note that I have disabled camel case. This would turn something like MacBook or McDonalds into a link and that isn’t helpful for us. Instead only text enclosed in [[Square Brakets]] will be converted to a link.

Now that we have setup the code highlighting and freelinking we can actually create the input format.
- Head over to admin/settings/filters
- Create a new format. We’ve called ours “wiki-style”.
- Make sure the new format is at least available to the staff role
- Under filters we have checked: “GeSHi filter”, “Headings to Anchors”, “Table of Contents”, “Textile”, “URL filter”, and “freelinking filter”
- Save the settings
- While still on the same input format click the “Rearrange” tab. Here you can adjust the order that filters are executed. I haven’t noticed any conflicts, but you may want to keep an eye out and adjust as necessary

EDIT: In the above image I had “Line break converter” selected, however, with the textile converter this is not necessary and depending on the order they are interpreted in could even cause double line breaks.
Now that we have the input format setup, to make life easier, let’s set it so that input format is used by default when staff create a manual entry.
- Go to admin/settings/default_filter
- Add the following entry (Role = staff; Format = Wiki-Style; Node Type = “Manual Entry”). This will override the default and says, when a user with the role staff is editing or creating a manual entry use the wiki-style input format.
- Add other rules as needed.

Now, let’s test out or new wiki system. I’ve included a text file which you can download, open, and copy and paste into a book page. It will give you a general idea of all the options available to you and how it works.
Here is what that page will look like:

A couple things to note…
- You may want to learn more about the textile markup language
- Note the table of contents functionality; it will automatically add anchors to the H2 and H3 tags and produce a table of contents.
- Normal URLs are automatically parsed
- Text surrounded with [[Square Brackets]] are made into wiki links. Try clicking on one.
Step 8: Managing Revisions
Earlier on in this process, I got you to set revisions on by default. We’re going to take advantage of this now. Go ahead and make a change to an existing page and add a log message. When you do this the revisions tab will appear. Because we installed the diff module earlier we will get an added bonus when we click on the revisions tab.

You can now choose two different revisions and then click “Show diff” which is short for “Show differences”. When we do that we are shown the changes that were made.

Step 9: Discussions
So we’ve setup two books to be used as our client and employee manuals and we’ve add the wiki functionality to make this a more collaborative effort. However, from time to time we need to discuss company policies or best practices. We’ve already installed and configured the talk modules so let’s go ahead an enable it for this message.
Edit the book page you just created and under “Comment settings” set it to “Read/Write” and save. Notice that right away a talk tab is added. If you click on that you can now post the first comment.
Step 10: Staying up to date
It’s no use having a manual if no one reads it. Initially, we thought we might be able to keep people up to date via RSS. One could easily install the Views module and create an RSS feed and in addition install the Comment RSS module to include comments. However, that doesn’t allow for people to only get notified about the topics that matter to them and it doesn’t ensure that all changes to manual entries that affect them run past their eyes. So we decided to the use the subscription module.
- Upon installing the Subscription module you will want to make sure Content Subscriptions, Subscriptions, Subscriptions Mail, Subscriptions UI, and Taxonomy Subscriptions have been installed. In addition you will need to install “Mail Editor” and “HTML to Text”.
- Create a new vocabulary called Departments. (admin/content/taxonomy)
- Set it to show up for “Manual Entry” or “Book” (whatever yours is called)
- And allow “Multiple select”
- Next add the terms that you would like to use for example: Contractors, Design, Development, Employees, Information Architecture, Sales
- Go to admin/settings/subscriptions
- I set the unlisted content types and blocked content types to all but the manual entry (book) content type.
- I set all the vocabularies to “restricted” and “omitted” except for “Department”
- Under user defaults you can set the defaults for new users, I added the following to the defaults:

NOTE: I haven’t added any default subscriptions to specific user roles. You may want to.
Conclusion
That’s it. We’ve created a corporate manual that we can use for documenting client support as well as for internal employees. We’ve used the book module so that we have the ease and strucuture it provides, but we’ve also used wiki and revisions tools to allow for a collaborative. And in the last few steps we’ve enabled subscriptions so staff members can stay up to date on policies that matter to them.
Hi, really usefull and great post. Thank You very much for that. I followed all your step by step config nad have just one question on your suplyed TEST Page:
The “Table of content” do not show as your pictures look like. I have h2, h3, html tags that are not implemented as it should.
Cheers
@Wolfflow: You might want to try changing the order of filters on the input format. “Textile” will need to be called before “Headings to Anchors” and “Headings to Anchors” should come before “Table of Contents”.
Dear, Chris. That was it. Thanks for your kindly support. It Works !!!
;-)
Sorry to ask an ignorant question, but are you using Drupal 5.x or 6.x?
Never is one ignorant if he ask ;-) – Drupal vers.5.7
In addition ImageXmedia gave me the idea to support any kindly Site that write such great KnowHow posting and I did make a Blockfor it.
Cheers
@Wolfflow: Glad to hear it.
@Anonymous: We’re using Drupal 5.x for our current production site. We are waiting for the Views and CCK modules to have stable releases for Drupal 6.x before we upgrade. However, this tutorial doesn’t require views or CCK and could likely work just fine with Drupal 6.x
Hi, back again for some question and hopefully a hint.
I was asking myself if you may create a new content type and apply your configuration process. But I understood that all Wiki-Style Books rely to the Book.module. So after some research on Drupal.Org I found an issue : http://drupal.org/node/186962. It handle about the duplication of the Book.Module. Really that is not on my level of risk. So I may ask you if making the configuration again as you listed does limit the creation of other Books without Wiky-Styles, I mean can they cohexist ? Or do you have a better Solution for that.
Cheers
@wolfflow: The setup I have used above uses the content type book hich is created by the book module. If you want to have the kind of hierarchy and functionality the book module allows then yes you would need to use that content type. For the most part the wiki functionality is provided through the input format. Using the Default Filter module you could set the input format for a book to be something different for different roles. However, in the wikitools module you select the content types you want to use, you can’t do it on per book basis. Not sure how this affects things. Let us know what you find out.
Hi, Admin. Thanks for your reply. As I’m working on a Site that have to use Wiki-Styles but
have also different BooK access as for different classes of features registered user may want to use, I’ll report here how I managed that. It’s a matter of sql tables access that have to be configured in a way that the cloned book.module do not interfeer with the original one.
Cheers
Hi, Chris, just shortly back. The cloning of the Book Module from Drupal 6.3 was successfully. I could not test the Wiki-Style environment fully, due to not yet all necessary modules are ported to 6. Next future I will build a report in form of a Tutorial on my Site.
It will take a bit, the Tutorial is planed to be a step by step manual for installing a full implementing Drupal LAN Test enviroment. So Thank you for your support and motivation you gave me with your Article. Cheers
wolfflow: I’ll definitely be interested to see that article.
Hi Chris, I started the work on the Tutorial, you may see it at Tutorials . Be aware that first I’m not english native and the tutorial it’s not complete. The section about the Module installatiion, comprensive of Summary of yours (only if you allow me of course) and other are not yet started, first ungrade to 6 will happen almost after Drupalcon in Szeged, Hungary (25.08.08)
but I will reply. I started Testing on a new Site the “Libro” module, as i named the cloned Book module. Keep in touch.
Cheers
@wolfflow: Thanks for sending that through. I’m ok with you borrowing my tutorial as a write up, but maybe just link back to this blog post in the credits or a foot note. Thanks and have a good time at Drupalcon
@Chris Of course I will do that. This page is allright linked. My envolvment is that I will try to translate the Tutorial in german so as in Italian on my Site. This will be my contribution in turn of your sharing and for the Drupal Community. Thanks. See ya!! ;-)
Has anyone had any experience with getting TinyMCE working with the modules listed in this corporate manual guide? I have TinyMCE 2.1.2 with the TinyMCE 5.x-1.x-dev module and I can’t get TinyMCE play nice with the formatting in the sample wiki entry listed above. TinyMCE wipes out the whitespace formatting and the tag. I think I have my TinyMCE profile set up properly so that it should ignore HTML code in the post but I’m not sure. Any advice?
Hi Dan, I don’t have any direct experience with this, but I would suggest trying the stable version of the TinyMCE module, I believe it no longer impacts the white space and line breaks of the code. Also, try using FullHTML rather than filtered.
@Chris – Thanks for the suggestions. I tried different input filters and played with the TinyMCE module, the WYSIWYG module (TinyMCE module is depreciated in favor of the WYSIWYG module and the WYSIWYG module only supports TinyMCE at the moment), and I also tried FCKeditor. I kept coming back to the TinyMCE module with TinyMCE 2.x. I basically had to abandon the use of the default text editor on pages created with TinyMCE so now, in order to address the issue of formatting between the basic editor and TinyMCE, I just set TinyMCE to be always enabled by default. Users can still disable it if they want, but I found most of my users take no issue with TinyMCE unless it is presented to them in all avenues of interaction with my site.
Thanks for the help!
@Dan – Thanks for writing back with the solution you found, I am sure other readers will find that helpful. Thanks!
Hi Chris, As I have promised I will report that cloning the Book.module (6 & 5) does work perfectly and we can have two separate Book-Sections one with Wiki characteristics and one without. As for the Book-Access.module is not yet fully tested for 6, I cannot guaranty the full control over the two or more Books-sections, but there are many other solution one’s can implement to grant access to two or more different working groups.
Cheers
Here again, I just wanted to thank you and send you the link where I have republish your tutorial: http://wolf.zirbs.garschagen.at/content/corporate-manual-wiki-style , please take a look and if anything is not reported as you like let me know I will immediately change.
Cheers
@wolfflow: Thanks for following up, and thanks for linking back to the original article!
Hi!! This is definitely the best guide out there…I’ve been struggling with wikitools for a while now wondering what the missing links were…what a relief to find this page.
Where is your wiki? The next step for me would be… if a user searches for a page that does not exist, they are not prompted to create that page (I’d also like to have them select which book to put it in and, if possible, which “chapter” (chapters being a sub topic within the book…if that’s an appropriate term).
Have you done this or do you know of a help page/forum on this topic? I thought you touched on it in the article but I must have missed something.
Other comments…may want to elaborate on the textile library step (I had to go look that up) and also cron updates.
Thanks a million for getting my wiki running!
This is a great tutorial.
I would like to see some information on printer friendly pages for this newly created manual.
Hi, Chris, want to report some bug that rise when cloning the Book.module:
First I have to list some additional modules a part of yours listed in the Tutorial
that I have installed on my Blog:
I did not pay especially attention, but as I have the Revisions activated when I try to edit the
Wikipage of my content-type “Libro” (so I called my cloned Book.module) the
got automatically edited twice when I save the node andso deleting all the content. The work around at the moment is to edit the revision-node in sql and delete the doubled tag and have to edit the content and insert in
sql-table-node with phpMyAdmin.
I will report as soon I got the bug fixed.
Cheers
FYI – Announcement: Just want to inform that the link I provided early, above in my comments are not anymore valid. I tranfered every activity about WIKI and others to the Company Site http://adaccs.at. I apology for this to have caused some trouble to interested visitors.
Thanks
Post new comment