O'Reilly logo

Orchard CMS: Up and Running by John Zablocki

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Creating Modules

We’ve already seen that Orchard may be extended easily and quickly by installing modules from the Gallery. When we wanted to add an image field to our event pages, we just installed the ImageField module. When we didn’t want to create our own contact form, we just installed one that someone had already written and shared. So what happens when we want functionality that isn’t readily available in the Gallery? Well, we just have to trade instant gratification for a little elbow grease.

The Places Field

Some of the most interesting data sources available to developers are those that contain places information. These are the databases that allow you to check into a business or some other venue with Facebook or Foursquare. When you arrive somewhere, your phone (or HTML5 capable browser) sends your location to a server-side API where a list of businesses, restaurants, and other public points of interest is then returned to the phone. You select the one where you are and check in.

While it’s unlikely that users will be checking into the Daisy’s Gone site, there’s another use of places data of which we might wish to take advantage. Consider the case of Meetup.com, where users who want to schedule a Meetup for their group are asked to select a location before saving the new event. The location is chosen from an auto-suggested list of places, similar to the check-in features of Foursquare and Facebook.

This is the functionality we’re going to add to our Event content ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required