Book Image

Drupal 7 First Look

Book Image

Drupal 7 First Look

Overview of this book

Drupal 7 contains features for which site administrators have been clamoring for years, including support for fields, an improved administration interface, better database support, improved theming, and more. You could of course make a laborious search on sites, blogs, and many online tutorials that would promise to update you about every new feature, but there's an even better way to know all about Drupal 7's new features: Drupal 7 First Look is the first and only book that covers all of the fantastic new features in Drupal 7 in depth and covers the process of upgrading your Drupal 6 site to Drupal 7. If you've used Drupal 6 and want to use Drupal 7, you need this book.Drupal 7 First Look takes an in-depth look into all of the major new features in Drupal 7 so you can quickly take full advantage of Drupal 7. It also assists you in upgrading your site to Drupal 7. Some of the new features in Drupal 7 include: Fields API, based on Drupal 6 CCK, which allows you to easily build your own content types Improved user interface for administering your website Built-in support for working with images and files Improved security for the site and users of the site Completely rewritten database layer DBTNG to make working with the database easier and more secure. Improved API for custom module development and user interface theming
Table of Contents (13 chapters)
Drupal 7 First Look
Credits
About the Author
About the Reviewer
Preface
Index

RDF API


To support the new RDF functionality in Drupal 7, a new hook has been added to the Drupal API. The new hook is hook_rdf_mapping, which allows you to define RDF mappings for the field bundles attached to entities defined by the module. The return value of the method should be a nested array defining the structure of the mapping as follows:

  • type—the entity name

  • bundle—the name of the bundle (content type) that the mapping applies to

  • mapping—an associative array with a key for each field to be mapped

  • predicates—an array of RDF predicates describing the relationships between the bundle and the value of the field. The value will be text, another bundle, or a URL.

  • datatype—a type used with the callback to format data so that it is readable by machines. For example, you can use this to properly format dates so that a computer can use the data.

  • callback—a method to be called for the given datatype

  • type—a string used in the RDFa markup to identify the type of the field

  • rdftype—a property...