• Home
  • Computers
  • Drupal's Building Blocks: Quickly Building Web Sites with CCK, Views, and Panels

Drupal's Building Blocks: Quickly Building Web Sites with CCK, Views, and Panels

By Earl Miles, Lynette Miles

“Even if you’re already a pro Drupal person of CCK, perspectives, or Panels, I’ve without doubt that this booklet gives you a number of new options and techniques for buying the main out of those super crucial modules. It definitely has for me.”

Dries Buytaert, founder and venture lead of Drupal, and CTO of Acquia 

With Drupal, internet pros can create full-featured sites with quite a few clicks. Drupal’s center is compact and good documented, yet a lot of Drupal’s sizeable energy lies elsewhere—in exterior modules. Drupal’s development Blocks is an authoritative instructional, reference, and cookbook for Drupal’s most beneficial modules.


The authors are Drupal insiders who’ve spent years growing and helping those modules—Earl Miles, developer of the perspectives and Panels modules, and Lynette Miles, Drupal documentation group member. They’ve introduced jointly fundamental details you won’t locate at any place else, in addition to large pattern “recipe” code designed for simple edition and reuse. find out how to

  • Use content material building equipment (CCK) to customise your info enter varieties round your needs
  • Improve website flexibility with Drupal’s node system
  • Add not obligatory box forms, together with PHP-based fields
  • Customize subject matters to demonstrate facts extra attractively and legibly
  • Build strong perspectives question displays
  • Integrate with SQL databases
  • Customize perspectives with relationships, arguments, and filters
  • Optimize question performance
  • Add customized types with the Panels module
  • Maintain complete regulate over websites as you install into production

This e-book may help you create extra robust, versatile, usable, and viable net sites—whether you’re an internet developer, dressmaker, administrator, architect, or consultant.


The accompanying website comprises all examples, code, and issues awarded during this book.

Show description

Quick preview of Drupal's Building Blocks: Quickly Building Web Sites with CCK, Views, and Panels PDF

Show sample text content

Click on the + signal subsequent to Arguments. three. select Node: Created month and Node: Created yr. four. click on upload. five. within the configure display, the wildcard worth might be “All” via default. ensure the motion to take is decided to “Summary, variety descending,” after which click on the replace buttons for either fields. 6. pick out the record sort. 7. click on the “Rearrange” button, and placed “Created 12 months” prior to “Created month. ” eight. click on replace. nine. click on store to avoid wasting the view. Now you could have a view with an archive-style skill. you could move a username, 12 months, and month to the URL; this stack of arguments will then be handed to the view, retrieving all posts made by means of that person.

Datestamp is the UNIX timestamp, that is very worthy for programming, database paintings, and a few degrees of sorting, yet isn't very person pleasant. Realistically, clients aren't see the uncooked inner values of the database. Datestamp additionally has the drawback of in simple terms bearing in mind dates again to January 1, 1970. The Date box sort is a simple string, kept as textual content. this is often very consumer readable, however it can't be used for something other than reveal. The Datetime box style offers a database-native timestamp that may be used for many dates wanted via clients.

Personal home page, that's a template for all fields in all perspectives, to the hugely particular views-view-field--recent-items-shirts--page-1--body. tpl. personal home page, a template for the physique box within the recent_items_shirts view on web page 1 of the view. we need the physique box for this view, however it doesn’t subject which web page it really is on within the record. that suggests that our greatest choice is to decide on one power template: views-view-field--recent-items-shirts—body. tpl. Hypertext Preprocessor. If we had additional this box to different screens, we'd create another template dossier.

We wish to swap the way in which the fields themselves are displayed. 7. decide on the web page show for the view, and click on topic: details within the uncomplicated settings field. for that reason, we wish to swap the best way the fields are laid out, yet only for this view. Given this constraint, we’ll probably are looking to switch the “Row variety output” surroundings and create the fitting template dossier for it. the main applicable dossier for this goal is views-view-fields--blog-rss-page. tpl. personal home page, that is the unformatted record type for the blog_rss view, with the web page exhibit.

In this tab, you could exclude issues from the teaser or the total node. observe that there’s a distinction among the “Hidden” and “Exclude” offerings. The “Hidden” selection contains the knowledge yet doesn’t demonstrate it at the web page. by way of comparability, the “Exclude” selection prevents the information from being extra to the variable in any respect. return and take one other examine determine 2-11 to work out the place an Exclude button is offered. in the event you choose a box from the exhibit fields tab, the drop-down menus for “Teaser” and “Full node” either let you decide upon “Hidden” to conceal the sphere.

Download PDF sample

Rated 4.86 of 5 – based on 42 votes