Drupal Tutorials

How to fix the issue with images not showing up in the catalog or in the cart for Ubercart

Aaron Hawkins Posted by Aaron Hawkins September 26, 2010
  • Share

I spent several hours banging my head up against the wall looking for a solution to the missing images on the Ubercart catalog and the checkout cart section. I searched and I searched and on google I found scores of other frustrated developers who had run into the same problem, but I didn't find any solution posted. It turns out that the actual solution is very simple, but downright unintuitive.

How to make views accept multiple CCK values as arguments

Aaron Hawkins Posted by Aaron Hawkins September 11, 2010
  • Share

As of the date of this writing views 2 for Drupal does not have a canned method of accepting multiple arguments that are CCK fields. The case where this came up for me was in a CCK select field that had dynamically generated options (created through php). The options were years, and the user was allowed to chose multiple years. How then, can one set a view to dynamically filter for content that had been marked with at least one of the years sent in the argument?

CCK create automatically updating year select field

Aaron Hawkins Posted by Aaron Hawkins September 10, 2010
  • Share

When you want to create a list of years as a select field in CCK ranging from some set date in the past to the current date you have a couple of options. The first option would be to go through and manually enter every year from that date to present. This may be ok if you only are working with a date range of 3 or 4 years, but what if you want to list the years since the 1800s. Obviously that list would be painful to make, and what's worse you would have to make sure the site was updated every year by someone competent enough not to destroy the information.

How to remove spaces when using term names or node titles for views arguments (SEO Optimization)

Aaron Hawkins Posted by Aaron Hawkins September 9, 2010
  • Share

There seems to be some debate as to whether there is an actual SEO penalty to using spaces or the encoded %20 in urls. I've spent some time researching the matter and I wasn't able to come away with any conclusive evidence one way or the other. However, when a client wants a site with no spaces or %20 in the urls that is in itself a deciding factor.

Apparently my client and I aren't the only ones that ran into this problem, and perhaps I wasn't the only one to come up with this solution, but I didn't find it posted anywhere else on the internet, so I am going to post it here.

How to create a custom template file for a form with Zen subthemes

Aaron Hawkins Posted by Aaron Hawkins September 1, 2010
  • Share

There are two stages of understanding needed in order to create a template file for a form in a Zen subtheme. The first level in my opinion is to understand how to achieve that same result in a normal theme.

In a normal theme all we need to know in order to create a working tpl (template file) for a form is the form id in question and the format to connect that form to the tpl from within the template.php file.

Official Documentation for the JQuery Menu API

Aaron Hawkins Posted by Aaron Hawkins February 8, 2009
  • Share

This document is intended for module developers who wish to make use of JQuery to process an array of hierarchical data into a click and expand menu. It is written with the assumption that you are a programmer and that you know how to create multidimensional arrays through recursive functions.
The only function that third party modules need to call from JQuery menu in order to create a click and expand menu is as follows:

theme('menu_creation_by_array', $menutree, $trail);

This calls the theme function menu_creation_by_array() and sends it two arguments:

How to show all nodes tagged with children terms with Views 2 for Drupal 6

Aaron Hawkins Posted by Aaron Hawkins February 8, 2009
  • Share

The Views module for Drupal 6 (also known as Views 2) ships with several default views which allow you to override certain Drupal core list pages. One of the most useful of these views is the view provided for taxonomy term list. Just recently I decided to set up views to override my taxonomy pages so that they would show children terms, but when I jumped into the Views 2 interface and tried to actually do it I was left a little perplexed; if you are reading this page you probably were too.

PixelClever newsletter

Stay informed on our latest news!

Syndicate content
Drupal Tutorals RSS

Drupal Tutorials

How to Declare a Views Template Inside of a Module

The usual rule of thumb in web development is that styling (css, javascript etc...) should be done primarily inside of themes....
[Read More]

How to Remove all SVN Folders from a Site

Svn has an annoying habit of adding thousands of folders and files into every level of your site when you put your code under...
[Read More]

How to turn off Vertical Tabs for a specific content type

I rarely do any heavy structural changes to node edit pages, so until today I hadn't ever had a reason to disable vertical tabs...
[Read More]
Drupal Tutorials
Drupal Blog RSS

Drupal Blog

Free, Unlimited, Private Git Hosting - The Holy Grail of Version Control

If I were paid minimum wage for the time I have spent investigating various git and svn hosting services (both free and paid) I...
[Read More]

Mac OSX + Drush = Time saved

The longer I have my mac the more things I find that drastically simplify my life as a Drupal developer. Now for fairness sake I...
[Read More]

New to Drupal? A word from the wise: Never say newbie!

I have nothing against new Drupal users on Drupal.org, even the most advanced Drupal developers were new to Drupal at one point...
[Read More]
Drupal Blog