muriqui
Great designs deserve great code.

Need code? Let’s talk.

Blog

Articles on Drupal, CSS, jQuery, and whatever else may cross my mind.

Adding variables to Drupal.settings

If you’ve ever looked at the HTML code that your Drupal site spits out, you may have noticed something like this in the <head> section:

jQuery.extend(Drupal.settings, { "basePath": "/" });

And you may have thought, “So what? Drupal stores the base path in an array. Big whoop.” Well, what’s cool about this is that it’s one of the ways Drupal makes it easy for you to pass values computed in PHP to your jQuery scripts. ... Read more

Category:

Controlling access with hook_menu_alter

So for my first post, I thought I’d share a nifty trick with one of Drupal’s many (many, many) hook functions, hook_menu_alter. Every once in a while, I’ll run into a situation where a module’s built-in permissions just aren’t granular enough. Rather than change the module code directly (bad idea), I’ll use hook_menu_alter to add the permissions I want. ... Read more

Category: