views

Passing Page Arguments to View Panes

Recently I was faced with the task of passing off multiple page arguments to a view pane, which seems simple enough after you have done it once, but the first time around I found myself wading through settings for far too long. The scenario: we were working with Page Manager to create pages and within a page we had a View Pane that needed to be filtered based on the context filters being passed to the page as arguments in the URL.

How to Fix Caching for Views With Exposed Filters in Drupal 7

One of the better features of the views module in Drupal is the ability to cache your view's output. This can come in handy when your view is doing a lot of computation. Caching your view will save your server a lot of unneeded work. One of the big current drawbacks of this feature is if you enable caching for your view and you have an exposed filter, you'll run into the following scenario:

How to Pass Multiple Values through an Exposed Filter in Drupal Views

I regularly work with Views and recently I have had a few odd needs. One of which was when a user selects an item, that item then disappears from the view. The view has exposed filters with AJAX turned on. Since I don’t know how many items I’ll need to filter, I’ll need a way to pass multiple values through an exposed filter. Views apparently does not do this out of the box. If I was filtering on a content field setup for multiple values this may be easier. But no, I am filtering on nids. Since nids are a system field, Views sets the filter handler to 'views_handler_field_numeric'.

Custom Sort Drupal Content with the Draggable Views Module

In the world of sorting, sometimes 'newest first' or 'oldest first' just doesn't cut it. During a recent Drupal project, we had a client who wanted to be able to control the order of their marquee images in random ways via a drag and drop interface.

Enter the Draggable Views module. In about thirty minutes, I was able to set up custom drag and drop functionality for several content types on their site. Let's dive in and I'll show you how it's done. If you prefer a video tutorial, skip to the end of this post.

Using Drupal Contextual Filters in Views

It can take a while when you're new, but once you start to wrap your head around Views, that is when Drupal gets really fun. In this tutorial, I'll go over how to use Contextual Filters in Views to alter your content dynamically based on information in the URL. If you're a visual learner, you can skip to the video at the end of this post for a detailed walk through of the process.

Drupal 7 Tutorial: Creating Custom Filters in Views

I love views. It makes my job easier, so I can focus on the more complex things, rather then having to hand-write queries, create forms for filtering data and it saves time debugging my typos. Every so often you will get a request that can't be accomplished out of the box.

If you are trying to customize the options in an exposed form, you may still need to do hook_form_alter(). Or, if you are trying to filter or sort your view by a field that doesn't appear in views, this short tutorial will show you how.

Drupal 7 Tutorial: Creating Edit Content links in Views

Update: Use this module

Old Method: Views can be very handy, but the views interface can be a little tricky. A question that comes up when training clients is "Why can't I edit this content?" when they are looking at a view. If you use the node row style, Views will add them for you but not if you use the fields style. You can surely explain how views work (results may vary depending on the client), but an even easier method is to create edit links that link directly to your content and use a little CSS/jQuery to make sure it's shown when and where it's needed. Using this method creates a handy little gear button when you roll over the content, with a link that says "Edit Content" when you click on it.

Ready for transformation?