Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Drupal 5 Themes

You're reading from   Drupal 5 Themes Create a new theme for your Drupal website with a clean layout and powerful CSS styling

Arrow left icon
Product type Paperback
Published in Dec 2007
Publisher Packt
ISBN-13 9781847191823
Length 260 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Toc

Cloning a Theme


Let's get started by making a copy of the Zen theme. We'll keep the original and work on the copy. I recommend you always employ this approach to cloning themes: by preserving the integrity of the original, you have a reference and you maintain the ability to roll back your changes in the event a serious problem arises.

Cloning a theme is a simple matter. First, make a copy of the original theme and place the copied directories in the sites/all/themes directory. Next, rename the directory with your chosen theme name. In the case of the Zen theme, we also have to re-name the sub-theme, Zen-Fixed, which has its own directory.

Let's name the new primary theme Tao and the secondary theme Tao-fixed. The result of copying and renaming the directory should look like the illustration.

The result of cloning the Zen theme and re-naming the copied directories

After re-naming the theme, it is necessary to re-name any theme-specific functions.

Open the template.php file in our Tao directory...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image