Drupal 6 Theming Cookbook 1847198686, 9781847198686

Written in cookbook style, this book offers solutions to all common theme design problems through recipes. Each recipe c

285 85 6MB

English Pages 384 Year 2010

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Cover......Page 1
Copyright......Page 3
Credits......Page 4
About the Author......Page 5
About the Reviewers......Page 6
Table of Contents......Page 8
Preface......Page 12
Introduction......Page 18
Installing and enabling a theme......Page 21
Uploading a new logo......Page 23
Uploading a new favicon......Page 25
Adding a slogan to the theme......Page 27
multiple themes......Page 29
administration......Page 31
Adding an existing block to the theme......Page 32
Adding a custom block to the theme......Page 34
Displaying a block only on the front page......Page 36
user role......Page 38
node type......Page 39
Introduction......Page 42
Understanding the anatomy of a theme......Page 43
core theme......Page 45
sub-theme......Page 47
Changing the screenshot image of a theme......Page 51
Including a CSS file in a theme......Page 52
Enabling CSS optimization......Page 54
our tweaks......Page 57
Adding a CSS file from a module......Page 58
day of the week......Page 61
Creating a fresh look using the color module......Page 63
Introduction......Page 66
Clearing the theme registry......Page 68
Creating a theme from scratch......Page 70
Creating myzen, a Zen-based theme......Page 72
Choosing a CSS layout for myzen......Page 76
Overriding Zen template files with myzen......Page 77
Adding a custom region to myzen......Page 80
Adding a background image to the theme......Page 82
Adding a conditional stylesheet in Zen......Page 85
Modifying myzen's theme settings......Page 87
Introduction......Page 92
page.tpl.php......Page 94
particular node type......Page 98
specific node......Page 101
Theming made easy using the Devel module......Page 104
developer module......Page 106
template file......Page 110
of a username......Page 112
Styling the site maintenance page......Page 118
Introduction......Page 120
an object......Page 122
Analyzing variables using the Devel module......Page 125
Devel generate module......Page 128
Resetting the default theme manually......Page 131
Live preview with Web Developer......Page 133
Developer......Page 135
Turning off JavaScript in the browser......Page 138
Disabling CSS in the browser......Page 141
CSS using Firebug......Page 143
using Firebug......Page 146
Introduction......Page 150
Adding a variable to all node templates......Page 152
Deleting a variable from the page template......Page 155
Adding a custom theme setting......Page 157
Hiding all regions on a page......Page 159
instead of the submitted date......Page 162
Module-based variable manipulation......Page 165
Optimizing using hook_preprocess()......Page 168
Displaying the date field in calendar form......Page 172
Introduction......Page 176
Including JavaScript files from a theme......Page 178
certain pages......Page 180
focus......Page 183
Exporting a variable from PHP to JavaScript......Page 186
Adding default text to the search textfield......Page 188
Displaying comments in compact form......Page 191
Adding column-sort functionality to tables......Page 194
using JavaScript......Page 198
Introduction......Page 202
Adding a menu to our theme......Page 203
Adding content pages to the menu......Page 206
Styling the primary links menu......Page 207
Menu module......Page 210
Adding a drop-down navigation menu......Page 213
themes......Page 217
Hiding node links using CSS......Page 219
Styling all external links in a page......Page 221
Styling the Drupal pager......Page 223
Introduction......Page 228
Finding the form ID of a form......Page 229
Changing the height of a textarea......Page 232
Turning off the resize feature for textareas......Page 234
WYSIWYG HTML editor......Page 237
Reordering fields in a form......Page 239
with an image button......Page 243
Styling the comment form......Page 246
Using a fieldset to group fields......Page 249
Theming form elements......Page 254
Adding class attributes to form elements......Page 257
Introduction......Page 262
Creating a custom node type......Page 263
Hiding fields and labels during display......Page 268
Displaying fields together using field groups......Page 271
Theming CCK content using hook_nodeapi()......Page 274
Theming a CCK field using a template file......Page 277
ImageField module......Page 282
images on the fly......Page 284
Adding lightbox support for images......Page 288
Introduction......Page 292
Creating a simple view......Page 294
Styling a node listing using a grid display......Page 300
style plugin......Page 306
Embedding a view inside a node template......Page 312
Overriding the Views table style plugin......Page 316
Adding a class to a Views style......Page 324
Creating a custom Views style plugin......Page 328
Introduction......Page 336
Using Panels to create a front-page layout......Page 338
Embedding content in a panel......Page 342
Styling a panel with rounded corners......Page 346
stylizer module......Page 349
Changing the layout of a panel......Page 355
Creating a custom panel layout......Page 358
Replacing the site contact page with a panel......Page 364
Embedding tabbed panels in blocks......Page 367
Index......Page 372

Drupal 6 Theming Cookbook
 1847198686, 9781847198686

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Recommend Papers