Drupal How-To: Customize your Site's Mobile Look with Views

I can make this site do anying.......

The Challenge: A client web site that relies on the Node Gallery module to present a wide selection of project portfolio image galleries, that also needs to present those images in a sensible way on mobile devices. 

In my specific case, the built-in node gallery display is working just fine for the display on the main web site, but it's hopelessly broken in the mobile display.  Since my drupal skills are stronger than my ability to convince my clients that they don't need a site that functions on mobile devices, I need to come up with a display that will work in the mobile environment.  

The Solution: It's Drupal, babe.  Piece of Cake. 

I'm using the iWebkit theme and Mobile Tools module to handle the mobile display -- basically I'm switching themes based on the user's device.  Pretty slick, right out of the box.  

The key is a couple of new Views that make good use of arguments, relationships, and replacement patterns.  If you're new to these deeper mysteries of views, I'm going to continue this topic with a handful of posts that walk through the process of setting this up.  But here's the readers digest version:

 

  1. Create View #1, a view of galleries filtered by taxonomy terms (using arguments) to create the initial portfolio menu.
  2. In that view, rewrite links to the galleries using replacement patterns to point to View #2.
  3. Create View #2, using an attachment to display the full gallery description, and using replacement patterns again to direct the links to the individual images
  4. Create View #3 to display the individual image, if necessary. 

 

(I'll link to walkthroughs as I get them finished..... stay tuned......)

The good news: none of this is hard. And once you have a feel for what you're doing, this is only a couple hours work, and that includes coffee breaks and a phone call from your mother.  Not that coffee breaks and personal phone calls are billable time . . . . . of course not ......

 

 

 

Looking forward to your walkthroughs

I am very curious about your upcoming posts about this topic. First of because mobile is THE topic. Secondly because I am a contributor to the new docs for Node Gallery v3. Your posts might be worth a link in the upcoming Advanced Help for NG3. ;)

 

 

Navigation

User login

Connect
Sign in using Facebook

Syndicate

Syndicate content
Powered by Drupal, an open source content management system