Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough
Oct 15 2012
Oct 15

Almost a year ago, Module Monday featured the Views Datasource module, a tool for exposing custom XML and JSON feeds from a Drupal site. It's a great tool, but what if you need something a bit more... human-readable? A .doc file, or a spreadsheet for example? That's where the similarly-named but differently-focused Views Data Export module comes in.

Screenshot of administration screen

Views Data Export provides a custom View display type optimized for producing downloadable files in a variety of formats. Need a Microsoft Excel file with a list of the latest 100 posts on your site? Looking for a Microsoft Word .doc file that collects the text of the site's top-rated articles? No problem. The module supports XLS, DOC, TXT, CVS, and XML exports with format-appropriate configure options for each one. In addition, it uses Drupal's batch processing system when it's asked to generate extremely large export files, rather than timing out or giving out-of-memory errors.

Screenshot of resulting change to site

Whether you're putting together reports, giving users an easy way to download product data sheets, or conducting a quick, ad-hoc audit of your site's content, Views Data Export is a handy tool to have around. Its batch processing support makes it more reliable on large sites, and its support for a variety of "day to day" file formats means you'll spend less time juggling your data and more time making use of it.

Jan 24 2012
Jan 24
Lullabot logo

Lullabot has trained thousands of Drupal developers & guided the development of some of the largest Drupal websites.

Jan 16 2012
Jan 16

Back in the olden days of Drupal 5 and 6, the venerable CCK module came with a useful add-on: Content Copy. While it had rough edges, Content Copy allowed you to export a given content type and all of its custom fields into a snippet of PHP. The same module could be used to import that snippet of PHP code on another site and re-create the content type, with all of its settings and custom fields.

Sadly, that feature didn't make the cut when the CCK module became Drupal 7's built-in FieldAPI. While the Features modules has eclipsed Content Copy for serious site deployment, sometimes it would be handy to have the same easy "Export, save, and reuse later" option in Drupal 7. Enter Bundle Copy, the successor to Content Copy.

Screenshot of the Bundle Copy export screen

Like is ancestor, Bundle Copy is pretty straightforward: visit Content Types administration page and click the Export tab, then choose the content types you want to export. Pick the individual fields, submit the form, and voila -- a pile of PHP that can be saved to a text file, and re-imported to another site running Bundle Copy. The module also supports the new entity types that ship with Drupal 7: Users and Taxonomy Terms. If you've heavily customized user profiles with Drupal 7's FieldAPI, it's a quick and easy way to share the tweaks.

Screenshot of the Bundle Copy import screen

Although the Features module is a great solution for full-fledged deployment of Drupal configuration, it carries its own list of module dependencies. If you're simply trying to share some quick tweaks to a content type with a friend, or you'd like to move a content type from one of your sites to another without the overhead of a dedicated Feature module, Bundle Copy is worth checking out.

Sep 02 2011
Sep 02

Project deployment using Features

Posted on: Friday, September 2nd 2011 by Richard Mo

The contributed module, Features, has been out in the community for a while, and has been a tremendous help for deployment. It saves time and energy when moving from Development, Staging, then Production. Configurations become a 'one-click' solution, so to speak.

However, careful planning needs to be incorporated when creating packages with Features. Sometimes two Features can be in conflict with each other when both packages are using the same element - this is especially true for CCK fields. Features doesn't offer the easiest way to move elements within a package to another. For example, if Package A stores a content-type that has CCK fields and Imagecache presets, then to move it, any dependencies must be released manually. Here are a few tips, that I use, to ensure a smoother process for development and deployment:

  1. Whenever possible, group all related content-types, views, pages, etc. into a single package. Better yet, modulate functionalities or features into an atomic unit, so it is isolated and encapsulated.
  2. Try to minimize the amount of sharing of existing CCK fields among other content-types. Content-types within the same atomic grouping can share the CCK fields.
  3. Plan ahead the exact architecture of the site. Most important step!

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web