Syndicate

Feed

theming

Jun
18

Displaying the content type name

You want to print the content type name along with the 'submitted' info. This will be particularly useful for those who have created custom content types, with or without CCKRead more →

Jun
18

Theming comments by the node's author

You want the comment style to be different for comments added by the author of a node — who's commenting on his own node. For example, you may want to highlight the node's author's comments, so that any visitor skimming through the comments will easily differentiate them from other comments. Read more →

Jun
17

My top 10 favorite theming tweaks for content

Here is a collection of my 10 favorite 'tweaks' to content template files in Drupal 6. I will add one simple tweak a day, starting today.

May
27

Theming the contact form in Drupal 6

The following exercise consists in theming the contact form in Drupal 6. Once we're done, it will look like we'll have created two fall-back-on 'pages' for contact forms, one page/form to 'request a quote' at Randy.com/contact/quote, and an other page/form for general inquiries at Randy.com/contact/info. The trick here — if there's one — consists in theming the contact form differently based on the requested URI.

This exercise will show you how to:

  • recognize when a module has not registered a specific theming function for a form it generates,
  • register a theming function for a Drupal form in your theme, using HOOK_theme,
  • work with template suggestions,
  • use the Devel module function dsm() to inspect complex variables, such as Drupal forms.

 Read more →

May
09

Theming the node form in Drupal 6

The following exercise consists in moving pieces of code around, code that I did not write myself. Credit for the code goes to Joakim Stai (nicknamed 'ximo' on Drupal.org), the maintainer of the excellent Node form layouts module, as well as to the Usability group.

This exercise is all about gaining experience in:

  • adding theme settings to a theme configuration page
  • theming forms inside a theme, as opposed to writing a module for the same purpose
  • creating a sub theme

 Read more →

One file is attached to this posting. Login or register to download this file.


Apr
22

Building powerful and robust websites with Drupal 6

Packt recently published an expanded and updated edition of Drupal: Creating Blogs, Forums, Portals, and Community Websites. The new title is Building powerful and robust websites with Drupal 6, and it contains 362 pages with the index — 100 more pages than there was in the first book. The author, David Mercer, would like his book to become the Drupal community's de facto title for learning the technology Read more →

Apr
09

New Drupal theming ebook

I’m currently working on a Drupal 6 theming ebook. The beta ebook attached to this posting is for Drupal 5.
Update, March 29th, 2008.

I am in the process of writing a 50-and-some pages ebook on Drupal theming. I have an outline and a spiral book full of notes, and lots of sections are already written. My current draft (call that a beta-book) is 15 pages long and if you log in you may download it. Read more →

Because you are not logged in, you cannot see the 2 files attached to this posting. Login or register to download these files.


May
22

Theming the register form in Drupal 6

The following exercise consists in adding Terms of Use to the register form in Drupal 6. Provided that your website visitors aren't logged in, they can view the register form on the page myWebSite.com/user/register.

This exercise will show you how to:

  • recognize when a module has not registered a specific theming function for a form it generates,
  • register a theming function for a Drupal form in your theme, using HOOK_theme,
  • use the Devel module function dsm() to inspect complex variables, such as Drupal forms,
  • use the Theme Developer 'Themer info' widget to inspect those forms that only 'anonymous users' can see, for instance... the register form.

 Read more →

Mar
14

Packt Publishing Drupal 5 Themes reviewed

A first release candidate of Drupal 6 was made available on December 20, 2007, that is, two days prior to the publication of this theming guide... which covers Drupal 5! Drupal 6.1 has since been released, and many of Drupal’s most popular add-on modules are now ready for use on production web sites. The author mentioned on his blog that an updated version of his book will be published, but Packt Publishing is not yet listing 'Drupal 6 Themes' among its upcoming publications. Still, I read the book, and worked through its examples on a Drupal 6 install. As a somewhat seasoned Drupal developer, I still found the book helpful. I recommend it, provided that, as you read along, you refer yourself to the concise (and well-put-together) Drupal 6 theming guide available on Drupal.org. Theming has definitely taken a leap forward in D6. For instance, intercepting and overriding theming functions is a lot easier now.

I bookmarked quite a few pages in the book Drupal 5 Themes.

 Read more →
Feed