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 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.

*/

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