New Podcast

Posted Tuesday, January 31 at 3:28 pm
  Thomas Turnbull (tom_o_t on drupal.org) and Alan Palazzolo (zzolo on drupal.org) join Mike Anello to talk about their new book from O’Reilly Media, Mapping with Drupal. Mike’s usual co-hosts, Andrew and Ryan, were both unable to participate in the podcast, leaving Thomas and Alan subject to Mike’s long-winded (but extremely interesting by some accounts) questions.
Download Podcast 73
DrupalEasy_ep73_20120131.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

On March 11th I attended the first DrupalEasy Workshop in Orlando, Florida. I'm an experienced web developer who has recently picked up Drupal as a tool for helping to build high quality content-driven websites. Mike and Ryan were excellent teachers - they gave a thorough overview of a complex topic in a short space of time, and provided plenty of resources for us to continue learning. The workshop is essential for anyone who has previously configured a basic Drupal site and wishes to take their skills to an advanced level. I would not hesitate to recommend DrupalEasy.com training and hope to attend more workshops in the future.

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

Topic “views”

Filter a view based on empty Imagefield

Turns out there is no filter that asks wether or not an imagefield (or filefield) has a value. I came across this tip on Drupal.org. The recommendation was to use a relationship, and then choose "Require this relationship" to act as a filter. Pretty cool.

So assuming your imagefield is just called "Image", here is the walkthrough:

  1. Add a new view of type "node"
  2. Add one or more fields (I assume you want to include the image field) in the normal way

Reuse Fields for Future Views Sorting

When adding a field to a content type, it is tempting to create a new field, and to assign it a name so unique that it could never possibly clash with the names of fields you may create in the future (at least in that particular Drupal installation). After all, most if not all Drupal developers have examined the field tables and columns in a Drupal database — in an attempt to determine everywhere that the field data is stored, and anything else in the database that can affect it — but have been frustrated when field names are similar enough to be confusing.

Taxonomy Term Pages on Steroids Using Panels and Views

4.62963
Average: 4.6 (27 votes)

Creating a well-organized, content-heavy website is difficult. Creating one that is also sustainable is even trickier. It's easy to keep adding features to a web site without considering how they fit into the overall plan until you get to the point where things start getting out-of-hand and site maintenance starts becoming a real issue (blame Drush for making it so darn easy to add new modules!)

Hide my block view if CCK field is empty

Let's say you have a CCK Imagefield you'd like displayed in a sidebar instead of the main $content area of your page. You can check exclude under Display Fields for that content type, and then use Views to pull out the field and stick in a block display, but if your node does not contain an image, you may notice that a few empty <div> tags are returned, and your theme might not be too friendly in this case. Now you need to find some way to hide that view if the field is empty...

Why not try adding a filter to the View?

I need to change the number of items returned by a view, based on the theme!

A friend recently came to me with the following question:

I have a site that has a mode optimized for low-bandwidth use. Can I change the number of rows returned by a view based on the theme?

The Views 2 API has a function called hook_views_query_alter() which allows you to modify the View object before it pulls the results from the database.

In order to use views hooks, you must create a module that registers itself as using the Views API:
<?php
function drupaleasy_views_api() {
return array(
'api' => 2,

Update a View's Description

I was banging my head up against the wall trying to figure out how to update a view's description (normally set when you first create the view) and I put the question out to the twitterverse and @_happygolucky_ came to my rescue with this link that simply explains that the view description is hidden behind the "tag" link on the view editing page.

(how's that for a run-on sentence!)

Views Bulk Operations Main Admin Content Screen

One of the most actively used administration pages on any drupal site is the main content administration page (admin/content/node). From this page, the site administrator can quickly get a list of all the nodes on their site as well as filter and sort the list in a variety of ways.

However useful you may find this, you may not be aware that the Views Bulk Operations module provides an even more useful main content administration page with the often requested "search by title" filter.

Exposed Filters on Block Views

Exposed filters in Views are a wonderful thing. They allow your site visitors the ability to dynamically alter a view to suit their needs best. But what happens when you display your view in a block?

Exposed filters on View pages use URL querystring variables to pass the filter variables back to the server, but when your view is displayed in a block, this isn't possible.

Exporting Data to Microsoft Excel

Need to export data from your Drupal web site to Excel?

Use the Views Bonus Pack module - it gives you the ability to set your view's style to CSV, XML, DOC, and other formats.

Check it out!

Showcase a User's Comments with Views and Menu Tabs

By now, you should know and love the Tracker module that comes with core. It has its strengths, but many weaknesses. For one, you can't separate out posts from comments, or sort the list in interesting ways. Views can help you make exactly the list you want, and place it in a tab on the user's profile exactly like the "Track" tab.

For this example, you'll be adding a list of comments. Creating the view is simple enough:

  1. Clone the default view comments_recent, and call it comments_by_user
  2. On the Page display, add a Relationship for Comment:User
Syndicate content