The book covers many aspects of Drupal theming that require much more detailed explanation, that the book does not give, and in many cases it's of little use to those without a good knowledge of programming Drupal.
Author(s): Ric Shreves
Publisher: Packt Publishing
Year: 2008
Language: English
Pages: 312
Tags: Библиотека;Компьютерная литература;Системы CMS / CMF;Drupal;
Cover......Page 1
Table of Contents......Page 8
Preface......Page 18
The Importance of Themes in Drupal......Page 24
Theme It in Whole or in Part......Page 25
Build with Blocks......Page 27
Intercept and Override......Page 28
What is a Theme?......Page 29
The Range and Flexibility of Drupal Themes......Page 30
What You See on the Screen......Page 32
The Big Picture: How Drupal Displays a Page......Page 35
The Default Themes of the Drupal Distro......Page 37
The Theme Files......Page 41
The Files of a PHPTemplate Theme......Page 43
Summary......Page 46
Finding Additional Themes......Page 48
Installing an Additional Theme......Page 52
Theme-Specific Configuration Options......Page 57
Color Picker......Page 59
Enable/Disable Page Elements......Page 60
Logo Settings......Page 61
Global Configuration Settings......Page 62
The Module Manager......Page 64
The Blocks Manager......Page 66
Configuring Individual Blocks......Page 68
Adding PHP to Blocks......Page 71
Theming in Action: Dressing Up Garland......Page 73
Set Page Elements (Toggle Display Settings)......Page 75
Upload Logo......Page 76
Manage Blocks......Page 79
Add Some Dummy Content and Links......Page 81
Create a Custom Block......Page 82
Set Block Visibility......Page 84
Uninstalling Themes......Page 85
Summary......Page 86
What is PHPTemplate?......Page 88
How Does It Work?......Page 89
The Role of the .info File......Page 92
The Role of the page.tpl.php File......Page 93
A Basic PHPTemplate Theme—Bluemarine......Page 97
A More Complex PHPTemplate Theme—Garland......Page 99
PHPTAL......Page 101
PHP XTemplate......Page 102
Summary......Page 103
Putting Together the Pieces—Templates, Stylesheets, and Functions......Page 104
Default Templates and Variables......Page 105
The Themable Functions......Page 106
Common Theme System Functions......Page 107
Default Templates......Page 108
Themable Functions......Page 110
Default Templates......Page 111
Default Templates......Page 112
Default Templates......Page 114
Default Templates......Page 115
Default Stylesheets......Page 116
Theming the DBLogModule......Page 117
Themable Functions......Page 118
Themable Functions......Page 119
Theming the Forum Module......Page 120
Default Templates......Page 121
Default Stylesheets......Page 122
Default Templates......Page 123
Themable Functions......Page 124
Default Templates......Page 125
Themable Functions......Page 126
Theming the Pagination Functionality......Page 127
Default Templates......Page 128
Default Templates......Page 130
Themable Functions......Page 131
Default Templates......Page 132
Default Stylesheets......Page 133
Default Templates......Page 134
Themable Functions......Page 136
Themable Functions......Page 137
Default Templates......Page 138
Themable Functions......Page 139
Default Templates......Page 140
Themable Functions......Page 142
Summary......Page 143
Overriding the Default CSS......Page 144
CSS Overrides in Action......Page 146
Various Approaches to Overriding Default Styling......Page 148
Substituting Templates......Page 149
Overriding Templates......Page 150
Overriding Themable Functions with Dedicated Template Files......Page 152
Where to Place Themable Function Overrides......Page 154
How to Name Themeable Function Overrides......Page 155
Overrides in Action: A Look at Overrides in Garland......Page 156
Intercepting the Default Template Files......Page 157
Overriding Themable Functions......Page 158
Summary......Page 159
Setting Up the Workspace......Page 160
Planning the Modifications......Page 162
Creating a New Subtheme......Page 163
Making the Transition from Zen to Tao......Page 165
Enabling Modules......Page 166
Creating Dummy Content......Page 167
Setting Up Menus......Page 168
Adding New Regions......Page 170
Enabling and Configuring Blocks......Page 173
Setting the Page Dimensions......Page 175
Setting Fonts and Colors......Page 176
Formatting the Sidebars and Footer......Page 179
Formatting the Vertical Menu......Page 180
Formatting the Search Box and Syndicate Button......Page 181
Adapting the Themable Functions......Page 182
Overriding a Themable Function......Page 183
Modifying a Default Template......Page 184
Before and After......Page 186
Summary......Page 187
Planning the Build......Page 188
Creating a New PHPTemplate Theme......Page 192
Building a .info File......Page 193
Building a page.tpl.php File......Page 195
Insert DocType and Head......Page 197
Insert Body Tags......Page 198
Lay Out the Page Divisions......Page 199
Place the Functional Elements......Page 200
The Final page.tpl.php File......Page 207
The style.css File......Page 210
Build a New Pure PHP Theme......Page 219
Required Elements......Page 220
Head of Document......Page 221
Site Name......Page 222
Sidebars......Page 223
Tabs......Page 224
Theme Closure......Page 225
Summary......Page 226
Using a Separate Admin Theme......Page 228
Multiple Page or Section Templates......Page 229
Use a Different Template for a Group of Pages......Page 231
Designate a Specific Template for a Specific User......Page 232
Dynamically Styling Modules & Blocks......Page 233
Dynamically Styling Blocks......Page 234
Dynamically Styling the Forum Module......Page 236
Creating Dynamic CSS Styling......Page 237
Changing the Body Class Based on $body_classes......Page 238
Working with Template Variables......Page 240
Intercepting and Overriding Variables......Page 241
Making New Variables Available......Page 242
Summary......Page 243
How Forms Work in Drupal......Page 244
How to Approach Modifying Forms......Page 247
Templates for Blocks Containing Forms......Page 248
Override the Default Template Associated With the Form......Page 250
Using a Theme Function to Control Elements......Page 251
Modifying Forms With Custom Modules......Page 254
Modifying Data Labels and Other Text......Page 257
Modifying the Styling of a Form......Page 258
Using Images for Buttons......Page 259
The User Forms......Page 260
The Poll Module Forms......Page 0
The User Registration Form......Page 262
The User Profile Form......Page 263
Summary......Page 270
A Guide to Drupal Stylesheets......Page 272
admin.css......Page 273
aggregator-rtl.css......Page 274
book-rtl.css......Page 275
color-rtl.css......Page 276
dblog.css......Page 277
defaults-rtl.css......Page 278
help.css......Page 279
maintenance.css......Page 280
openid.css......Page 281
profile.css......Page 282
style.css......Page 283
system.css......Page 284
system-menus.css......Page 285
tracker.css......Page 286
update-rtl.css......Page 287
user-rtl.css......Page 288
Marvin......Page 289
Bluemarine......Page 290
Pushbutton......Page 291
Garland......Page 293
Minnelli......Page 295
Chameleon......Page 296
Content Construction Kit......Page 298
Panels Module......Page 299
The Web Developer Extension......Page 300
Index......Page 302