Instant Premium Drupal Theme
Copyright 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2013
Production Reference: 1241013
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84719-752-8
www.packtpub.com
Credits
Author
Pankaj Sharma
Reviewers
Pradeep Saran
Anton Sidashin
Acquisition Editors
Akram Hussain
Andrew Duckworth
Commissioning Editor
Priyanka Shah
Technical Editor
Krishnaveni Haridas
Copy Editor
Kirti Pai
Project Coordinator
Romal Karani
Proofreader
Ting Baker
Production Coordinator
Pooja Chiplunkar
Cover Work
Pooja Chiplunkar
Cover Image
Sheetal Aute
About the Author
Pankaj Sharma is a senior software engineer with a multinational IT firm in Noida, India. He has more than five years of developing experience in Perl, PHP, and CMS (WordPress, Drupal). Besides these technologies, he has also worked on AJAX, JavaScript, MySQL, and PostgreSQL. He has developed scalable websites for some of the world's leading companies in FMCG and the media and entertainment domain. He completed his degree (BSc.) in 2003 and post-graduate Master's degree (MCA) in 2007 in Dehradun. His interests include Cloud Computing and Big Data and his hobbies include writing, reading, travelling, and delving into philosophy.
I would like to express deep gratitude to God, my 'guiding light' and inspiration. I would like to thank my brothers Neeraj Sharma and Dheeraj Sharma for their valuable suggestions and inputs. Thanks to my parents, Mr. and Mrs. Suresh Chand Sharma, as well for their unconditional love and support.
About the Reviewers
Pradeep Saran is the founder of Devsaran (http://devsaran.com/), a Bangalore-based software development startup that specializes in developing modern web applications. His primary focus is frontend development and web application development.
He has been very active in the Drupal open source community. He has developed and maintains contributed modules and themes on drupal.org. His Drupal user account can be found at https://drupal.org/user/1031208.
I would like to thank my family and friends for their support in all of my endeavors. I would also like to thank Packt Publishing for providing me with the opportunity to do something useful. Thanks also to the Drupal community, whose willingness to share their knowledge and advice has become an invaluable asset.
Anton Sidashin is the CEO and, at the same time, the developer of a small Drupal agency, Pixeljets.com, which specializes in building beautiful Drupal projects and themesboth commercial and open source. The core of the agency is Anton and his brother Oleg, and there is also a team of Drupal and Symfony2 ninjas who help these brothers a lot.
He has been working with Drupal since the release of its 4.5 version in 2005, when he fell in love with the flexibility and power of this CMF.
He is a Zend-certified PHP5 engineer and he also worked as the senior architect of CS-Cart 2 e-commerce solutions back in 2007-2008.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print and bookmark content
- On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Preface
This book will describe the relevant steps used to create Drupal themes from raw HTML in a simple and lucid manner and save the energy and time wasted in irrelevant tasks.
What this book covers
Understanding Drupal jargon , covers the commonly used Drupal terminologies that are essential for theme development in Drupal. The heart of Drupal themes and theme engines will also be explained in this chapter.
Understanding Drupal's theme structure (Simple) , covers the names of Drupal templates and pages and their meaning/work. Drupal's default themes will be explained here.
Configuring raw HTML in the Drupal environment (Simple) , explains how an HTML file is configured in the Drupal environment using the knowledge acquired in the preceding two sections.
Breaking down HTML in parts (Intermediate) , explains how to break down HTML regions of Drupal theme such as header, footer, and content.
Populating the Drupal theme with dynamic content (Advanced) , explains the prerequisites to use Drupal template variables and how to use them.
Theme how tos (Advanced) , introduces the commonly used code in Drupal theme development, which will save lot of time and energy.
What you need for this book
To run the examples in the book, the following software will be required:
- XAMPP or WAMP: http://www.apachefriends.org/en/xampp-windows.html
- Drupal: https://drupal.org/download
Who this book is for
This book is useful for developers who are new to Drupal. It's assumed that you have some experience in HTML,PHP, and CSS .Readers are expected to have the PHP (LAMP/WAMP) environment ready and working to install Drupal. It is assumed that the user is aware how to install Drupal. A little bit of familiarity with CMS is also expected from the user. Rest of the things have been taken care of in the book.