Adding Canonical Tags To a View

The Metatags module is great. The things it does automatically across the system is really fantastic, but there's one major problem. It can't add tags to views. That's not so bad, except that paged data might really benefit from canonical links. There are multiple modules in development right now that could be used to solve this issue, but nothing I've found that is really solid. So, here is a simple hook fix you could implement from a custom module to handle the gap for now.

Tags: 

Drupal Development Settings.php Additions

When doing frequent work for a client, you'll often need to pull the database down. There's a pretty large cost to doing this at times if you have to constantly change variables to suite development needs. Thankfully settings.php (which should never be in a repo, and thus never reach the production server), provides us a way to override variables using the code base.

Tags: 

Programatically Creating A Sales Rule Coupon Code

Had a request today for the system a Magento system to automatically create a coupon code using an existing sales rule (shopping cart rule). They wanted to control the requirements and logic in Magento's admin, but let a third party create coupon codes as required.

Tags: 

Find Nearby Nodes

I frequently need to find nodes near a location. The needs vary, but the actual search logic rarely changes. I use this function, along with the installed Location module to find nodes near a coordinate set. Note that this is Drupal 6 code. You'll need to adjust the variable handling for D7.

Pages

Subscribe to Fragmented Thought RSS