Difference between revisions of "Drupal file list"

From WolfTech
Jump to navigation Jump to search
(Finished vocabulary section)
Line 1: Line 1:
 
==How To Create A Taxonomy Based File List In Drupal==
 
==How To Create A Taxonomy Based File List In Drupal==
  
This page will guide you in setting up a list of uploaded files in [[Drupal]]. Hopefully the information contained in this tutorial will be as deep as [[Drupal]]'s learning curve (if ever that were possible).
+
This page will guide you in setting up a list of uploaded files in [[Drupal]]. Hopefully the information contained in this tutorial will be as deep as [[Drupal]]'s learning curve is high (if ever that were possible).
  
 
==Create File Content Type==
 
==Create File Content Type==

Revision as of 14:13, 28 February 2008

How To Create A Taxonomy Based File List In Drupal

This page will guide you in setting up a list of uploaded files in Drupal. Hopefully the information contained in this tutorial will be as deep as Drupal's learning curve is high (if ever that were possible).

Create File Content Type

To begin, you should have administrative privileges and the Views and Taxonomy modules should be installed.

Bring up your Administer menu and navigate to Content Types under the Content Management category. We need to create a new content type to hold our uploaded files, so click Add Content Type near the top of the screen. Under the Identification tab, name the content type 'File' of type 'file' and write a brief description such as, "A node to hold an attached file." Skip the Submission Form tab. Under the Workflow tab, make sure that the Default Comment Setting is set to 'Disabled' and Attachments are enabled. Save your new content type.

Cool, you've created a content type to hold your uploaded files.

Creating And Populating A Vocabulary

We are about to define a list of terms (a vocabulary) to define our new File content type.

Adding A New Vocabulary

Return to the Administer menu, navigate to Categories, again under the Content Management category, and click on Add Vocabulary near the top of the screen. Name your new vocabulary 'File Type' and add a description such as, "Different categories of files." The Types option box should only recognize the content type 'File' and term Hierarchy should be disabled. Before saving, make sure you check the Required option, so that every File content type will have an associated word in the vocabulary. Go ahead and submit your vocabulary.

Generating Terms

Now that we have created a vocabulary, it will show up on the Categories page under the name 'File Type'. To populate the new vocabulary, click the Add Term link under the 'File Type' tab. Give the term a Name and a short Description before submitting it. You can repeat this step to add any other 'File' terms to your vocabulary. Once finished, you can click List Terms under 'File Type' on the Categories page to view or edit the terms you have added to the vocabulary.