taxonomy everywhere

51

Upload: drupalcon-paris

Post on 01-Sep-2014

1.976 views

Category:

Documents


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Taxonomy Everywhere
Page 2: Taxonomy Everywhere

presenters

Bart Feenstra | nederdev.comBenjamin Melançon | agaric.comChach Sikes | chachaville.com

Matthias Hutterer | mh86Benjamin Doherty | bangpound

Page 3: Taxonomy Everywhere

What is taxonomy (bart)

Page 4: Taxonomy Everywhere

What is taxonomy in Drupal 6?

"The taxonomy module allows you to categorize your content using both tags and administrator defined terms. It is a flexible tool for classifying

content with many advanced features."

People need to categorize, tag, sort, and otherwise organize stuff.

Administrators need to set it up so that other people who did not attend this session can also

categorize and tag.

Page 5: Taxonomy Everywhere

Use cases of taxonomy

Page 6: Taxonomy Everywhere

Taxonomy for Photo Gallery

Categorize your pictures into albums

No need to create the album first

Technique courtesy Dan Hakimzadeh (Agaric) and whoever he stole it from.

Page 7: Taxonomy Everywhere

Taxonomy for Photo Gallery, cont.

● Not necessary for this demonstration, but we have three vocabularies here!

Page 8: Taxonomy Everywhere

Taxonomy for Photo Gallery, cont.

You can create new photo albums on the fly, or select an existing one from autocomplete dropdown.

Page 9: Taxonomy Everywhere

Taxonomy for Photo Gallery, cont.

Page 10: Taxonomy Everywhere

Taxonomy for Photo Gallery, cont.

anjaliforberpratt.com/photos/Beijing-Paralympic-Games

That links to the albumthat the photo is in.

It gets a nice namethanks to the ViewAlias module,drupal.org/project/view_alias

Page 11: Taxonomy Everywhere

Taxonomy for Photo Gallery, cont.

Clicking the photo brings one to the album, rather than the individualphotograph.

Page 12: Taxonomy Everywhere
Page 13: Taxonomy Everywhere

Taxonomy for Photo Gallery, cont.

The same view can be used to show photos from different vocabularies.In addition to the event-based albums, you can instantly get category(such as Outreach, shown here) or even keyword-based albums.

Page 14: Taxonomy Everywhere

Taxonomy for Everything

Page 15: Taxonomy Everywhere

Taxonomy for Everything, cont.

Most of the content types have corresponding vocabularies. In thiscase, we create a web link and through the power of free tagging adda new person to our categorization, which immediately will work forfaceted search and everywhere else we use taxonomy.

Page 16: Taxonomy Everywhere

Taxonomy for Everything, cont.

Page 17: Taxonomy Everywhere

Taxonomy for Everything, cont.

Page 18: Taxonomy Everywhere

Taxonomy for Everything, cont.

data.agaric.com based on work and concept by Kathleen Murtagh.E-mail [email protected] for code or to be notified as it is released.

Page 19: Taxonomy Everywhere

Flex Exposed Filter View with Taxonomy

Leadel.net example courtesy Linnovate.net.

Page 20: Taxonomy Everywhere
Page 21: Taxonomy Everywhere
Page 22: Taxonomy Everywhere
Page 23: Taxonomy Everywhere
Page 24: Taxonomy Everywhere
Page 25: Taxonomy Everywhere
Page 26: Taxonomy Everywhere
Page 27: Taxonomy Everywhere
Page 28: Taxonomy Everywhere
Page 29: Taxonomy Everywhere
Page 30: Taxonomy Everywhere
Page 31: Taxonomy Everywhere
Page 32: Taxonomy Everywhere

Contrib Taxonomy Modules

• Top 10– Tagadelic – Taxonomy Menu– Content Taxonomy– Taxonomy Manager– Feed Element Mapper– Taxonomy Breadcrumb– Menu Trails– Taxonomy Image– Taxonomy Access Control– Taxonomy Access Control Lite

Page 33: Taxonomy Everywhere

Taxonomy Manager

• Tool for managing large sets of terms

Page 34: Taxonomy Everywhere

Taxonomy Manager - New Features

• i18n support for multilingual vocabularies– language selector

– translations

Page 35: Taxonomy Everywhere

Taxonomy Manager - Double Tree

Page 36: Taxonomy Everywhere

Term Edit

• provides links on taxonomy listing pages to directly edit taxonomy terms

Page 37: Taxonomy Everywhere

Content Taxonomy

• CCK field type for referencing taxonomy terms

• much more flexible than core taxonomy fields

• D7: Taxonomy Fields are in core!

Page 38: Taxonomy Everywhere

Content Taxonomy - Widgets

• autocomplete• select lists• checkboxes / radio buttons• taxonomy tree

Page 39: Taxonomy Everywhere

Widgets

• Active Tags

• Multiselect

Page 40: Taxonomy Everywhere

Hierarchical Select

• enhanced widget for letting the user select items in a hierarchy

Page 41: Taxonomy Everywhere

Taxonomy in Drupal 7

Page 42: Taxonomy Everywhere
Page 43: Taxonomy Everywhere
Page 44: Taxonomy Everywhere
Page 45: Taxonomy Everywhere
Page 46: Taxonomy Everywhere
Page 47: Taxonomy Everywhere
Page 48: Taxonomy Everywhere
Page 49: Taxonomy Everywhere

Taxonomy entities

Page 50: Taxonomy Everywhere

/** * Implement hook_field_info(). * * Field settings: * - allowed_values: a list array of one or more vocabulary trees: * - vid: a vocabulary ID. * - parent: a term ID of a term whose children are allowed. This should be * '0' if all terms in a vocabulary are allowed. The allowed values do not * include the parent term. * */function taxonomy_field_info() { return array( 'taxonomy_term' => array( 'label' => t('Taxonomy term'), 'description' => t('This field stores a reference to a taxonomy term.'), 'default_widget' => 'options_select', 'default_formatter' => 'taxonomy_term_link', 'settings' => array( 'allowed_values' => array( array( 'vid' => '0', 'parent' => '0', ), ), ), ), );}

Trees can be whole vocabularies or just pieces.

Page 51: Taxonomy Everywhere

Drupal 8 wish list

● hook_vocabulary_info● Taxonomy UI administration specific for

vocabulary types (tags, controlled vocabularies, webs of knowledge)

● Vocabulary index● Full support for SKOS specification● Vocabulary sharing, import/export

7