Drupal

Logo: 

Drupal Views Node View May Kill Your Pager

I installed the blog module today for a client. Loaded 200+ blog entries, and went to /blog to see the result. I was greeted by the most recent blog entry, and nothing else. I spent a good hour chasing down why more than one blog entry would not show, and the result turned out to be a views / Drupal interaction bug.

Tags: 

Force search reindex for specific nodes

I had the occasion to need to change the search indexing logic for a specific content type. The site has thousands of nodes, many not of the type that had it's search index logic altered. Calling for a full search reindex would be a very time consuming process, when I only need to do a fourth of them. The answer turns out to be extremely simple.

Tags: 

.htaccess no subdomain redirect

I'm not fond of the .htaccess shipped with Drupal, or at least not the redirection lines they suggest. I prefer not having to replace my sub domain. Also, I like having standard sub domains for development: dev., m., and local. I replace them with this:

  1.   RewriteCond %{HTTP_HOST} !^(www|local|dev|m). [NC]
  2.   RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Tags: 

Automatically set location for 'find nearby' views

There's an interesting conflict between wanting to offer automatic location detection of users, and allowing them to correct you. Most major sites will take one of two options:

  1. Guess at your location
  2. Ask for it

Most clients I've found do not want to ask, they prefer to guess, and be corrected. Home depot is a notable exception that I remember, they demand your zip code upfront. But things like redbox, google, etc try to detect you first. This kind of behavior is actually somewhat easy to do in Drupal views. I'll show you how to setup a views proximity location filter to auto detect location when none is provided.

Pages

Subscribe to RSS - Drupal