Bookmark Us
User login
Video Tags
Recent comments
- Slot nuts online casino
8 hours 38 min ago - Vegas slot online casino
2 days 7 hours ago - Buspar similarty to xanax
5 days 10 hours ago - Buspar drug
1 week 6 days ago - Tmd buspar
2 weeks 4 hours ago - Buspar ocd works
2 weeks 6 hours ago - dave
2 weeks 6 days ago - mate flick
3 weeks 13 hours ago - Osha safety training requirements
3 weeks 6 days ago - Automated telemarketing
4 weeks 1 day ago
Recent blog posts
- cck & taxonomy
- Dynamically execute all Drupal cron jobs for an entire server
- Creating a view to show all nodes that exist in user's Organic Groups using argument handling code in Drupal 6
- CCK select option html entity issue
- Create an admin settings page for your module
- user warning: Got a packet bigger than "max_allowed_packet" bytes
- Creating a multipage form using the Forms API
- Defined Variables Scope Tip
- Load a CCK node $form object using drupal_retrieve_form
- Restrict which roles can modify node taxonomy
Navigation
cck & taxonomy
Drupal provides two methods for adding structured data to a node.
The first is the out-of-the-box Taxonomy module. Taxonomy allows you to associate a vocabulary with a content type. When creating or editing the node, you are invited to choose a value for the vocabulary from its associated list of terms. In essence, you are associating a structured field with your node. The name of the field is the name of the vocabulary and the value is the selected term.
The second method is the CCK module. The terminology of CCK is less confusing. Using CCK you define fields and associate these with a content type. When creating or editing the node, you are invited to set values for the associated fields. There are a few obvious differences between Taxonomy and CCK
- CCK fields can be created with many different data types (text, integer, image). Taxonomy terms are always text.
- The terms in a vocabulary may be arranged into an inheritance hierarchy. There is no such concept with CCK fields.
- Taxonomy vocabularies are exposed in the out-of-the-box Drupal advanced search feature. Combined with a hierarchical vocabulary, theoretically this allows for very sophisticated searching across site content.
But, the core functionality is the same - they both allow you to add structured data to a node. So, how do you know which of these methods you should use? After much experimentation, here are some simple rules I've found useful.
- Use Taxonomy to classify your content.
- At first, this decision seemed obvious, because Taxonomy is built into advanced search. However, when I discovered that the advanced search feature does not correctly search your taxonomy hierarchy, I became dubious that there was any point to Taxonomy whatsoever. If you could not perform a hierarchical search, what on earth was the point?
- Enter the Views module. Even though the out-of-the-box Drupal advanced search feature is not actually fully integrated with Taxonomy, the Views module is. You can easily use the Views module to create a personalized version of advanced search. As long as you set the magic "Option" flag to be the depth with which you want to search your taxonomy, Views-based searches will correctly perform hierarchical searches.
- Use Taxonomy to manage permissions
- Out of the box, Drupal allows you to set different permissions for different content types. E.g. you can allow a particular role to edit only a particular subset of content types.
- This is nice, but can get a little clunky. Suppose you are a news site, and you want to define a content type called "News Article". Suppose you have defined a vocabulary called Region with terms south-west, north-west, mid-west, south-east and north-east and that you have a different reporter assigned to each region and you only want to allow the north-west report to edit north-west articles, etc.
- One option is to make a bunch of different Content Types, one for each region. The other option is to install the Taxonomy Access Permissions module. This allows you to set permissions using the Region vocabulary.
- Use CCK fields for everything else
- In the end, CCK is more flexible, so for most other structured data needs, it should be just the ticket!
No comments
Popular content
- WAMP + phpBB Forum Software (4,850)
- Install Free Message Board PHP Script (3,150)
- Add external Javascript and CSS on Friendster (... (662)
- PHP Tutorial : Making a comment system without... (593)
- User Signup Page using PHP and MySQL (541)
- Thing Thing 4 Trainer (516)
- Automatically generate meta keywords from a node... (473)
- PHP Tutorials : Login and Register : User... (416)
- Create Remember Me Login using PHP and Dreamweaver (374)
- Access and Modify User Profile using PHP and... (323)
- API GDATA (316)
- Affiliate Link Cloaking Using PHP Redirect (308)
- Basic CSS Tutorial (307)
- 1. Simple PHP Code and the WAMPserver (304)
- WAMP + phpBB Forum Software (280)
- Joomla! Tutorial - Email configuration for RSForm... (273)
- Oracle APEX Tutorial 3 - Creating a Drilldown... (264)
- Zend Framework tutorial 1 MVC basics (261)
- Dynamically resize image dimensions using jQuery (259)
- Create Dynamic Table using PHP and Dreamweaver (247)
- Create User Login using PHP and Dreamweaver (245)
- Flash CS3 AS3 Contact Form with PHP parser -... (239)
- Changing Link Color Using Dreamweaver (235)
- JForms (A WYSIWYG forms component for Joomla 1.5) (234)
- How to open all external links in a new window... (217)
- About Us (210)
- drupal fckeditor wysiwyg in 7 minutes (206)
- Flash WYSIWYG Open Code Rich Text Editor Tutorial... (203)
- PHP Tutorials: MySQL (Part 1) (196)
- Insert data Into Mysql Using PHP - Tutorial (193)
- Create Photo Gallery using PHP and Dreamweaver (190)
- How to make a maze game in Flash CS4 (188)
- PHP - MySQL - Flex 3 Client-Server Application (187)
- PHP-SYSLOG-NG webinstall (185)
- Progress Bar : ajax php (183)
- XAMPP - Make your Computer a Webserver: Apache,... (181)
- REC #94 Cascading Style Sheets level 2 CSS2... (179)
- Drupal Tutorial - Building A Yahoo Answers Clone (179)
- Create Master/Detail pages using PHP and... (177)
- Update- uCoz Site .... What about Webs (176)
- Drupal Tutorial - Breadcrumbs (176)
- PHP Tutorial 1 : Beginners Basics (175)
- Drupal Tutorial - Theming Search Results (175)
- DMC Tutorial - How To Make A Link In Same Page... (175)
- Using Kompozer The Best Free WYSIWYG Editor (174)
- PHP Screenshot Class Demostration (173)
- PHP MVC Introduction - FUSE Model View... (172)
- HTML Tutorial 1 (171)
- Drupal 6 Cache API Example / Tutorial (171)
- scripting tutorial -Css & Html 1_4 (170)
Search This Site
Tags in source
Today's popular content
- WAMP + phpBB Forum Software (4,441)
- Install Free Message Board PHP Script (2,899)
- Add external Javascript and CSS on Friendster (TUTORIAL) (535)
- PHP Tutorial : Making a comment system without SQL. (534)
- User Signup Page using PHP and MySQL (495)
- Thing Thing 4 Trainer (441)
- Automatically generate meta keywords from a node's taxonomy terms (413)
- Create Remember Me Login using PHP and Dreamweaver (324)
- API GDATA (289)
- Basic CSS Tutorial (243)
- PHP Tutorials : Login and Register : User Registration (MySQL) Part 2 (233)
- Affiliate Link Cloaking Using PHP Redirect (223)
- Access and Modify User Profile using PHP and Dreamweaver (219)
- WAMP + phpBB Forum Software (208)
- REC #94 Cascading Style Sheets level 2 CSS2 Specification (174)





















Add your comment