9
Bending Zen Intro Using Zen Theme’s functionality, but bending it into your own theme. http://dudenhofe r.com

Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

Embed Size (px)

Citation preview

Page 1: Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

Bending Zen IntroUsing Zen Theme’s functionality, but bending

it into your own theme.

http://dudenhofer.com

Page 2: Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

Needed for Theming

•Text Editor (Coda, Dreamweaver, ect.)

•Knowledge of CSS, HTML, and a tiny bit of PHP

•FIREBUG, BABY!

•A creative mind

http://dudenhofer.com

Page 3: Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

Before Getting Started

•Consider the most Efficient Layout

•Regions

•Div tags

•Custom Blocks/Views/Fields

http://dudenhofer.com

Page 4: Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

•Don’t make more regions than necessary

•Use existing regions as much as possible

•Regions are listed in the .info file

Regions

the PHP call is defined inside the

[ ]

this side sets the region name in the

block admin

http://dudenhofer.com

Page 5: Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

Regions

Flexible by default in

Zen

http://dudenhofer.com

The possibility of shuffling the regions makes it even more

flexible

These regions make it possible for content to

be editable.

Page 6: Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

Theming Tip #1

•If at all possible, try to avoid hard-coding into the page.tpl.php file.

http://dudenhofer.com

This doesn’t mean you’re never going to hack the page.tpl.php file, but consider your options

before you do! And try to keep it minimal.

Page 7: Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

<div> Tags•Only code ID and Class attributes

into the page.tpl.php file

http://dudenhofer.com

Good

Bad

Keeps code clean and changes more flexible

Code gets cluttered, you will likely have to apply the style multiple

times, and future changes will take more work

Page 8: Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

Custom Blocks/Views/Fields•Not all blocks,

views, and fields need the same style.

•I put custom theme styles at the bottom of the CSS

•Comment your code!

http://dudenhofer.com

Page 9: Bending Zen Intro Using Zen Themes functionality, but bending it into your own theme

Best Practices

•Try to follow best practices as much as possible - they make life easier for you as well as anyone else that may be using your code later.

•http://drupal.org/node/341707

http://dudenhofer.com