Book Image

Drupal 7 Mobile Web Development Beginner's Guide

By : Tom Stovall
Book Image

Drupal 7 Mobile Web Development Beginner's Guide

By: Tom Stovall

Overview of this book

<p>How disappointing is it to log on to a website for a product or business you love only to discover the feature you were drawn to doesn’t work on your mobile or tablet? Drupal has brand new features to adapt your existing site into a mobile site that will keep your customers coming back.</p> <p>The Drupal Mobile Web Development Beginner's Guide follows a humble 'Mom &amp; Pop' restaurant website which gets a makeover complete with cutting edge features that play to mobile, tablet and desktop audiences. By following the fun example, you will finish the book having effortlessly adapted your website so that it is accessible and, more importantly, looks good and functions well, on any mobile device.</p> <p>Restaurant websites are notoriously horrible to navigate and our Mom &amp; Pop example is wellintentioned but no exception to this rule. We bring this site out of the early 1990's with cutting edge development practices and a team development workflow. This pizza chain goes mobile with location services, audio, video, charting and mapping worthy of any multi-million dollar site. Each chapter examines the way the site works and shows you how to move the existing content and functionality into reusable features.</p>
Table of Contents (18 chapters)
Drupal 7 Mobile Web Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Pop quiz Answers

Hooks, styles, and build modes


What is DS? At its core, it consists of two main things. First, it takes node, user, or comment properties and wraps them in DIV's with specific class names and patterns. In the first chapter, we mentioned that Drupal's modules extend the core by implementing a series of "hooks" that allow you to name a function correctly and have that function executed at a certain time with certain data. For instance, a hook that you can probably get familiar with right away would be hook_preprocess_page. This hook allows you to alter variables on your page.tpl before the final output is rendered. DS uses some node, user, and comment hooks to take the data from the database, wrap it in DIVs with predefined classes, and substitute it for what is normally returned as the rendered node. DS also adds a CSS file to the Drupal base CSS that has some default layouts for those predefined classes. Let's take a look at some nodes that have been themed with DS and the markup that it...