views

By Phil Frilling, 6 September, 2012
I ran into an issue today where I needed to get a themed views title from within a views row style template file (tpl). I tried using drupal_get_title() and menu_get_item() but the title elements were all blank for these. Next I inspected the $views object looking for the themed title but it was not listed. Finally, I discovered within $views->build_info the title and substitutions variables.
By Phil Frilling, 12 June, 2012
We had a Drupal 7 site setup with a default calendar instance that was displaying content of type 'event'. Due to the limited number of events this site would promote, it was decided to change the navigation from the standard 'Next/Previous' to use drop down menus where the user could choose the month/year they wanted to view.

The original look

Steps to accomplish this

Step 1

First, get your view setup to match the original.
By Phil Frilling, 31 January, 2012
Today I needed to create a view the filtered items by a range of prices. The prices for these nodes were stored in a CCK number field. After searching for an easy 'plug and play' method of doing this I quickly began writing my own code to accomplish this task. To summarize, I accomplished this by using the following functions:
  • hook_form_alter()
  • hook_views_query_alter()

Step 1.

Begin by creating your view and adding your CCK number field as an exposed filter. You'll want to be sure that you use the 'is between' operator.
By Phil Frilling, 1 November, 2011
Today I had the challenge of generating a view that needed to filter results based on the date/time a node was created. More specifically, I needed to filter bowling stats for a season. Easy, right? The problem I ran into is that the bowling season doesn't begin and end in the same year. So using an argument to only grab nodes created in 2011 didn't work. I needed the view to grab nodes between July, 2010 through July, 2011. Initially I experimented with Views Date Range.