Other
News & Other Musings
 

Drupal Menu Hell(p)

I recently had to implement what seemed like a very simple feature for a client, moving several of the local tasks located on a user's profile page into the site's primary menu. The menu paths in question are dynamic, E.g, /user/%/edit, /user/%/orders, /user/%/notifications, etc., which at first seemed like slight complication. So how to tackle this? At first blush, one might think that you can just use the Menu module to add a dynamic menu item though the GUI or menu API. Well, that won't work. You can only create a menu item that way for an existing path that you have access to. Luckily, Drupal provides a hook that seems like the perfect solution,

<?php
function hook_menu_alter(&$items) {
 
// Example - disable the page at node/add
 
$items['node/add']['access callback'] = FALSE;
}
?>

Great, so I can change the type of the menu items I want to alter by doing something like the code below and problem solved!

<?php
function mymodule_menu_alter(&$items) {
 
$items['user/%user/edit']['type'] = MENU_NORMAL_ITEM;
}
?>

First Avenue Rocking with a New Look and D6 upgrade

PastedGraphic1_eIio1n3GgsC8_Iw0ZkR7vmQEJ.jpgSorry, I couldn’t resist the play on the words. This storied Minneapolis nightclub has been a music mecca since the 70’s, entering the national spotlight in the mid 80’s when it helped launch Prince and was the venue for the classic movie Purple Rain. Level OS first launched the site around 6 years ago on a custom ASP.NET platform (cut me some slack, it was my first project with my own company!). It was migrated to Drupal about 2 and a half years ago, right around v5.2. That version of the site featured a custom Ubercart integration allowing the club to sell both tickets and sightline seats to events, along with regular merchandise, heavy use of CCK and Views for features like blogs, forums, and galleries, sample audio tracks, and an online community. In the ensuing two years, both the code base and design lacked the flexibility the site needed, so we updated both. Side note: It’s amazing what passed in my book for Drupal best practices 3 years ago! The upgrade process was, well, extremely painful to be blunt, and this coming from a fairly experienced Druapler. The challenges we encountered included:

Mapping with Drupal at Open Source Bridge

I'm submitting a talk to  Open Source Bridge - June 1–4, 2010 - Portland, ORI had a great time at last year's Open Source Bridge where I presented Drupal, What is it Good For. So I decided to give it a go again this year, focusing on Mapping with Drupal. I've had the chance to work on some great mapping projects so far this year, and have taken over the maintenance of the Mapstraction module. If selected, I'll present on what I've learned about the various mapping options and techniques in Drupal.

Look for a more in-depth post soon comparing the mapping tools available in Drupal.

JourneyGym

The Journey Gym is a exciting and innovative entry in the portable workout field just launched by Portland based startup Journey Fitness, LLC. It's been great working with their team launching the new site promoting and selling the gym. The site features:

  • Shopping cart powered by Ubercart.
  • Nutrition blog
  • Custom theme development, done in part by Eternalistic Designs.
  • Javascript rotating image galleries
  • Intro video displayed via a lightbox, streamed from the site using Filefield.
  • An FAQ section powered by the module of the same name.

Stay tuned for an online community and a system to put together your own workouts from a collection of exercise clips.

Portland Parks Foundation

Portland Parks Foundation

The Portland Parks Foundation

... engages the community in support of Portland's parks, recognizing that government agencies alone are not able to guarantee us the vibrant network of parks and park programs that are our rich heritage.

They are an amazing group of dedicated people who are working hard to ensure Portland's parks continue to serve as living rooms for our communities, playgrounds, sports fields, gardens, and lungs for our city. It's my pleasure to do a small part in helping them achieve their mission with this new website. It features another stellar design by Annette Brooks, and Views and CCK are put to use in showcasing the foundation's projects. Sprinkle in some custom image rotators and galleries, and you have a great new website.

Syndicate content