Last updated September 12, 2009. Created by JohnNoc on March 3, 2008.
Edited by figaro, LeeHunter, aserver, add1sun. Log in to edit this page.

Caution
Many of the operations described below to modify your new Drupal site so that it acts as a normal (albeit superior in every other way!) article directory are monotonous and highly repetitive. However stick with it, because it's worth the effort and the end result is a site with a much improved directory.

Creating Categories
Log into the administer section and click on content types. Here you will be presented with a couple of options, usually story and page, and if you've enabled the blog and forum modules these will appear here too.

This is the location where you will be creating your main categories, for example if your intention is to create a general directory you'll be creating categories like "business", "computers", "entertainment". If you want to create a niche directory then you will know what categories to use. Sub-categories are described later.

Click on the add content type and add the details (ie Business Articles etc) and continue until all your categories are created.

Creating Sub-Categories
If you haven't already done so, enable the Taxonomy module via Administer > Site Building > Modules, then return to Administer > Content Management > Taxonomy. From here you will be creating the sub-categories using Drupal's in-built tagging system.

From the Taxonomy menu (which should be empty if the site is new) you need to add a vocabulary and you are recreating your main categories again (eg "business", "computers", "entertainment" etc).

When this is completed, go to each individual category within Taxonomy and add terms: these are your sub-categories. For example, if the category is "business", your sub-categories will be for instance: "marketing", "PR" and "sales".

Carry out this process for every category until complete.

Linking Content
Now you've finished most of the work, you can now link it all together. As you should still be in Taxonomy, start with the top category, for example "business" and click on Edit vocabulary. Scroll down and you will be presented with a list of items. Click on the relevant box, eg if you are in "business", click "business".

Scroll down further and click the bottom box (required) which will then force authors to choose a sub-category which is always useful as most authors prefer to submit article to the parent category because it is usually more visible to potential readers.

What you are essentially doing here is tying Drupal content types to taxonomy and creating both Categories and sub-categories.

Permissions
From Administer > User Management > Permissions: edit your users permissions as required for each article category.

Tip: do not allow anonymous users to post content when your site is highly visible in public, as you will receive a lot of spam.

Show Categories on sidebars
To enable quick viewing of content you'll also need to show your content types on the home page. For this you will need to download and enable the module Taxonews.

This module allows you to use Taxonomy or the created categories in your article directory and thus place links to these on the site pages.

Further information can be found on Taxonews.

Project Goals
I am currently developing software that will give Drupal Article Directory users the option to receive content/articles via a community distribution system.

Comments
Thanks to Dave for the following advice:

''Simply create a taxonomy with relevant terms and sub-terms (and related terms etc) and then associate them as a required select for one content type (like 'story' or blog or article or a single new content type) regarding the use of sub-terms in taxonomy opposed to creating individual content types.''

I would point out that using taxonomy alone to create both categories and sub-categories allows for an author to post an article to the main category.

My experience of authors is that in general they prefer to post articles to the top/parent directory as it is more visible when visitors use the category links when searching for content, particularly at sites with thousands of articles.

The goal is to have correctly classified articles and when you are receiving hundreds or even thousands of articles per day it is too time consuming to check for the correct classification, which is the reason behind an article directory.

Dave's method works well if you are not particularly concerned where authors make posting and as he rightly adds:

''That not only will the 'create content' link lead to an overwhelming interface and permissions management will be burdensome for admin and that screen will be two miles long.''

The 'create content' link only leads you to the main article categories, so this will be site dependent. At my own site, which is intended as a general directory, there are only 22 content choices as I have disabled the usage of story, blog and forum for ordinary users.

As to the permissions interface, even though it is long, it is also necessary to create a directory where articles are categorised correctly.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

to get around that top level term stuffing - where authors junk it all into the top level term (e.g. stories - and not the subcategory) you could simply create each term as a top level and assign to the content type - easy unless you have five million terms ;)

but i'm confused - your users should not be seeing that top level content term unless you've incorrectly set it up as a subcategory with nested terms below it.

for example, i've got local news, and it's for content type 'page' - that's the 'content type' that i've set this 'taxonomy' to in admin

the 'vocabulary' (taxonomy) is called 'local news' [top level] and everything else falls below, so:

admin/vocabulary/list vocabularies shows:

+local news
+free tags (for some other thing, like adding free tags to any one or more content types ON TOP of just selecting some other category)

you click 'local news' ('view terms') and see

+local news
--sports
--business
--politics
--etc (

...and now when a user clicks to create content type "page" (associated with this vocabulary) he ONLY sees those terms (sports, business, etc) and NOT 'local news'

if you are not seeing this kind of drop down, then you've moved your 'local news' down too far!

fortunately, with d6, taxonomy management is "drag and drop" and so you should be able to fix this *instantly* by dragging whatever top level term you've accidentally got stuck down low - try it, and see if it changes the "drop down" box that users are seeing...it should.

........................................................................
i love to waste time: http://twitter.com/passingnotes

Hey Zilla,

Im not sure what you mean.. If I created

+local news
--sports
--business
--politics

They would also see Local News and be able to post in local news. Maybe I am doing something wrong?

> They would also see Local News and be able to post in local news. Maybe I am doing something wrong?

Create 'local news' as a vocabulary, and then create sports, business and politics as terms listed under that vocabulary. Now in the taxonomy selection, when content is created, the selection box should be titled 'local news', but the only selections you can make are sports, business or politics.

In the terms list, you could make sub-terms under sports, such as football, racing, etc. The user would be able to choose 'sport' or the sub-terms. The problem now is that, rather than being able to stuff 'local news', users might just put all their articles into 'sport' rather than choosing the correct sub-term (either out of laziness or because they think more people will see their article). To be able to control user-selection further (eg. to force them to choose an actual sport), see my post below regarding the HS module.

Everything I say is opinion, even if interpreted as fact.
Sometimes I may be inaccurate or *GASP* wrong!
Sometimes I attack Drupal due to frustration. Get over it.

The site you linked to is indeed an awesome directory, and it is a good tutorial.

However, I thought that the whole point of using taxonomy and tagging was to move away from this type of 'fixed' presentation of content? Isn't the paradigm shift in modern websites toward intelligent search facilities and user-controlled 'views', feeds and subscriptions?

By the way, keep an eye out for the 'Hierarchical Select' module: http://drupal.org/project/hierarchical_select

Most of the problems you cite regarding users submitting to the right categories can be solved/controlled with this module. For instance: only allowing submission to a fixed number of cats; selecting only from a subcat rather than the top level; and enforcing selection from the deepest subcat. As well as greatly simplifying the taxonomy selection area. It's not ready for D6 yet, but ETA is end of July 08.

Everything I say is opinion, even if interpreted as fact.
Sometimes I may be inaccurate or *GASP* wrong!
Sometimes I attack Drupal due to frustration. Get over it.

The site you linked to is a joomla site not drupal,

Thanks for bringing this up.

http://articlemarketing.org.uk/ *is* a joomla site, and I decided not to mention that because http://articleheaven.co.uk/ *did* link to a drupal site which illustrated this directory (at the time of me posting). However, since then it has been changed to a site powered by 'article trader': http://www.articletrader.com/articlems/

Basically, I've gone from being 'forgiving' to 'ruthless vigilante'.
This guy should be banished from drupal.org, and his gizzards hung from a pointy stick.

Everything I say is opinion, even if interpreted as fact.
Sometimes I may be inaccurate or *GASP* wrong!
Sometimes I attack Drupal due to frustration. Get over it.

"taxonomy, start with the top category, for example "business" and click on Edit vocabulary. Scroll down and you will be presented with a list of items."

I'm not presented with a list of items.

But I found some other ways to achieve my categories. Also, Drupal 7.8

I'm also looking for that "list of items". There's only name and description in that view. But what's the other way you found to make categories? I have Drupal 7.9

My 1/2 cents. I agree 100% with Dave and zilla "simply create each term as a top level in the Vocabulary and assign the vocabulary to the content type" as a term reference field. Using taxonomy to categorize your site is efficient and cuts down on the need to create a multitude of content types. Structuring the site around taxonomy rather than a multitude of content types enhances opportunities for code re-useability. It seems futile and require quite of bit of maintenance to create and support a bunch of content types that share the same basic field structures.

The core taxonomy module and contributed modules like Views Module and Hierachical Select Module gives you tremendous flexibility in categorizing and organizing your site. With the Hierachical Select module, "you can configure it to force the user to make a selection as deep as possible in the tree, or allow the user to select an item anywhere in the tree".

Using the method that Dave and Zilla described plus adding the functionalities of Taxonomy Menu Module, Views, Panels' Page Manager and Hierachical Select Module induces tremendous efficiencies in the collection of content, categorizing, displaying, maintenance and performance of your website. These are great and must have modules. This recipe will completely eliminate those "monotonous and highly repetitive tasks" in Drupal site building and maintenance.

ReggieW