售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Drupal 6 Theming Cookbook
Table of Contents
Drupal 6 Theming Cookbook
Credits
About the Author
About the Reviewers
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Drupal Theme Basics
Introduction
Installing and enabling a theme
Getting ready
How to do it...
How it works...
There's more...
Folder structure
Uploading a new logo
Getting ready
How to do it...
How it works...
There's more...
Directly linking to image files
Uploading a new favicon
Getting ready
How to do it...
How it works...
There's more...
Alternative methods
Adding a slogan to the theme
Getting ready
How to do it...
How it works...
There's more...
Similar settings
Allowing users to choose from multiple themes
Getting ready
How to do it...
How it works...
Displaying a different theme for administration
Getting ready
How to do it...
How it works...
Adding an existing block to the theme
Getting ready
How to do it...
How it works...
There's more...
Theme-specific block layouts
Adding a custom block to the theme
Getting ready
How to do it...
How it works...
There's more...
Doing more with custom blocks
Displaying a block only on the front page
Getting ready
How to do it...
How it works...
There's more...
Multiple pages
Matching against URL aliases
Exclusive display
Controlling block visibility based on user role
Getting ready
How to do it...
How it works...
Controlling block visibility based on node type
Getting ready
How to do it...
How it works...
2. Beyond the Basics
Introduction
Understanding the anatomy of a theme
Getting ready
How to do it...
How it works...
There's more...
Other theme engine types
Creating a sub-theme based on a core theme
Getting ready
How to do it...
How it works...
There's more...
Garland and Minnelli
Chaining
Overriding base theme elements in a sub-theme
Getting ready
How to do it...
How it works...
There's more...
Clean upgrades
Changing the screenshot image of a theme
Getting ready
How to do it...
How it works...
There's more...
Using the .info file
Including a CSS file in a theme
Getting ready
How to do it...
How it works...
There's more...
Overriding the base theme's stylesheet
Enabling CSS optimization
Getting ready
How to do it...
How it works...
There's more...
When to use it
Other optimizations
Creating the mysite module to hold our tweaks
Getting ready
How to do it...
How it works...
There's more...
Module builder
Adding a CSS file from a module
Getting ready
How to do it...
How it works...
There's more...
Adding inline CSS
Displaying a different theme for each day of the week
Getting ready
How to do it...
How it works...
There's more...
Displaying a random theme
Creating a fresh look using the color module
Getting ready
How to do it...
How it works...
There's more...
Custom presets
3. Custom Themes and Zen
Introduction
Clearing the theme registry
Getting ready
How to do it...
How it works...
There's more...
Clearing the cache using the Development block
Creating a theme from scratch
Getting ready
How to do it...
How it works...
Creating myzen, a Zen-based theme
Getting ready
How to do it...
How it works...
There's more...
Sub-theme of Zen
RTFM
Rebuild theme registry automatically
Choosing a CSS layout for myzen
Getting ready
How to do it...
How it works...
There's more...
Sidebar support
RTL
Custom layouts
Overriding Zen template files with myzen
Getting ready
How to do it...
How it works...
Adding a custom region to myzen
Getting ready
How to do it...
How it works...
Adding a background image to the theme
Getting ready
How to do it...
How it works...
There's more...
Custom file structures
Unused stylesheets
Adding a conditional stylesheet in Zen
Getting ready
How to do it...
How it works...
There's more...
Conditional stylesheets for other themes
Modifying myzen's theme settings
Getting ready
How to do it...
How it works...
4. Templating Basics
Introduction
Changing the layout of a page using page.tpl.php
Getting ready
How to do it...
How it works...
Customizing the appearance of a particular node type
Getting ready
How to do it...
How it works...
There's more...
Hiding submission information
Customizing the appearance of a specific node
Getting ready
How to do it...
How it works...
Theming made easy using the Devel module
Getting ready
How to do it...
How it works...
Theme overrides using the Theme developer module
Getting ready
How to do it...
How it works...
There's more...
Drupal API documentation
Compatibility issues
Listing all available variables in a template file
Getting ready
How to do it...
How it works...
There's more...
Doing it manually
Documentation
Displaying the profile name instead of a username
Getting ready
How to do it...
How it works...
There's more...
Realname module
Styling the site maintenance page
Getting ready
How to do it...
How it works...
There's more...
Maintenance template
5. Development and Debugging Tools
Introduction
Finding the right function to use to theme an object
Getting ready
How to do it...
How it works...
There's more...
Function reference and the theme registry
Analyzing variables using the Devel module
Getting ready
How to do it...
How it works...
There's more...
Removing debug functions after use
Other useful Devel module functions
Generating sample content using the Devel generate module
Getting ready
How to do it...
How it works...
Resetting the default theme manually
Getting ready
How to do it...
How it works...
There's more...
Using the Devel module to view and edit database variables
Live preview with Web Developer
Getting ready
How to do it...
How it works...
There's more...
Editing HTML and CSS using Firebug
View all CSS rules at once
Validating HTML and CSS using Web Developer
Getting ready
How to do it...
How it works...
There's more...
Validating HTML and CSS automatically
Turning off JavaScript in the browser
Getting ready
How to do it...
How it works...
There's more...
Disabling JavaScript in Opera
Disabling JavaScript in Internet Explorer 8
Disabling CSS in the browser
Getting ready
How to do it...
How it works...
There's more...
Disabling CSS in Internet Explorer 8
Inspecting elements and debugging CSS using Firebug
Getting ready
How to do it...
How it works...
Diagnostic logging of JavaScript using Firebug
Getting ready
How to do it...
How it works...
There's more...
Other console variants
Breakpoints, watches, and more
6. Advanced Templating
Introduction
Adding a variable to all node templates
Getting ready
How to do it...
How it works...
Deleting a variable from the page template
Getting ready
How to do it...
How it works...
Adding a custom theme setting
Getting ready
How to do it...
How it works...
There's more...
Zen's breadcrumb settings
Complex form options
Hiding all regions on a page
Getting ready
How to do it...
How it works...
There's more...
Selective hiding of regions
Displaying the last updated date instead of the submitted date
Getting ready
How to do it...
How it works...
There's more...
format_interval() and other format functions
Module-based variable manipulation
Getting ready
How to do it...
How it works...
There's more...
Adding classes to Zen-based themes
Optimizing using hook_preprocess()
Getting ready
How to do it...
How it works...
Displaying the date field in calendar form
Getting ready
How to do it...
How it works...
7. JavaScript in Themes
Introduction
Including JavaScript files from a theme
Getting ready
How to do it...
How it works...
There's more...
Executing JavaScript only after the page is rendered
Drupal's JavaScript behaviors
Including a JavaScript file only for certain pages
Getting ready
How to do it...
How it works...
There's more...
Checking paths with greater accuracy
Giving the username textfield keyboard focus
Getting ready
How to do it...
How it works...
There's more...
Keyboard focus on the first available textfield
Exporting a variable from PHP to JavaScript
Getting ready
How to do it...
How it works...
Adding default text to the search textfield
Getting ready
How to do it...
How it works...
Displaying comments in compact form
Getting ready
How to do it...
How it works...
Adding column-sort functionality to tables
Getting ready
How to do it...
How it works...
There's more...
Column filters and more
Minimizing and maximizing blocks using JavaScript
Getting ready
How to do it...
How it works...
There's more...
Minimizing or maximizing particular blocks by default
8. Navigation
Introduction
Adding a menu to our theme
Getting ready
How to do it...
How it works...
There's more...
Using the primary links block
Adding content pages to the menu
Getting ready
How to do it...
How it works...
There's more...
Access control and menu visibility
Styling the primary links menu
Getting ready
How to do it...
How it works...
There's more...
Adding secondary links
Contextual submenus using the Menu module
Getting ready
How to do it...
How it works...
Adding a drop-down navigation menu
Getting ready
How to do it...
How it works...
There's more...
Horizontal menus
Customizing breadcrumbs in Zen-based themes
Getting ready
How to do it...
How it works...
Hiding node links using CSS
Getting ready
How to do it...
How it works...
Styling all external links in a page
Getting ready
How to do it...
How it works...
There's more...
External links configuration settings
Styling the Drupal pager
Getting ready
How to do it...
How it works...
9. Form Design
Introduction
Finding the form ID of a form
Getting ready
How to do it...
How it works...
There's more...
Identifying the form ID from the HTML source
Changing the height of a textarea
Getting ready
How to do it...
How it works...
There's more...
Altering columns
Turning off the resize feature for textareas
Getting ready
How to do it...
How it works...
Replacing Drupal's textareas with a WYSIWYG HTML editor
Getting ready
How to do it...
How it works...
Reordering fields in a form
Getting ready
How to do it...
How it works...
Replacing a standard submit button with an image button
Getting ready
How to do it...
How it works...
Styling the comment form
Getting ready
How to do it...
How it works...
Using a fieldset to group fields
Getting ready
How to do it...
How it works...
There's more...
Collapsible fieldsets
Theming form elements
Getting ready
How to do it...
How it works...
Adding class attributes to form elements
Getting ready
How to do it...
How it works...
There's more...
Accounting for the search block
10. Customizing CCK
Introduction
Creating a custom node type
Getting ready
How to do it...
How it works...
There's more...
Adjusting the display order of fields
Multiple-value fields
Contributed modules: e-mail and phone
Hiding fields and labels during display
Getting ready
How to do it...
How it works...
Displaying fields together using field groups
Getting ready
How to do it...
How it works...
There's more...
Field groups and display fields
Theming CCK content using hook_nodeapi()
Getting ready
How to do it...
How it works...
Theming a CCK field using a template file
Getting ready
How to do it...
How it works...
Adding image support using the ImageField module
Getting ready
How to do it...
How it works...
Using ImageCache to scale and crop images on the fly
Getting ready
How to do it...
How it works...
Adding lightbox support for images
Getting ready
How to do it...
How it works...
There's more...
Advanced customizations using Colorbox
11. Views Theming
Introduction
Creating a simple view
Getting ready
How to do it...
How it works...
Styling a node listing using a grid display
Getting ready
How to do it...
How it works...
There's more...
Styling as a table
Merging columns with the Views table style plugin
Getting ready
How to do it...
How it works...
There's more...
Default views
Embedding a view inside a node template
Getting ready
How to do it...
How it works...
There's more...
views_embed_view() and view titles
Embedding Views using the Viewfield module
Overriding the Views table style plugin
Getting ready
How to do it...
How it works...
There's more...
Naming conventions
Adding a class to a Views style
Getting ready
How to do it...
How it works...
There's more...
Preprocess functions versus template files
Creating a custom Views style plugin
Getting ready
How to do it...
How it works...
12. Rapid Layouts with Panels
Introduction
Using Panels to create a front-page layout
Getting ready
How to do it...
How it works...
Embedding content in a panel
Getting ready
How to do it...
How it works...
There's more...
Editing existing content
Views support for Panels
Styling a panel with rounded corners
Getting ready
How to do it...
How it works...
There's more...
Styling individual panes
Creating custom styles with the Panel stylizer module
Getting ready
How to do it...
How it works...
There's more...
Stylizer for regions and panes
Changing the layout of a panel
Getting ready
How to do it...
How it works...
Creating a custom panel layout
Getting ready
How to do it...
How it works...
There's more...
Removing regions, rows, and columns
Replacing the site contact page with a panel
Getting ready
How to do it...
How it works...
Embedding tabbed panels in blocks
Getting ready
How to do it...
How it works...
There's more...
The flexibility of Mini panels
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜