User login

Drupal Theming

See all available variables for theming

Nicely written, Drupal-focused answer:

print '<pre>';
print '</pre>';

Off-topic, for Dan:

An example output for a fairly complex node (CCK, Taxanomy)

Theme a Views Table

Very useful thread, great helpful people responding to it:

How to theme view module's "table view"?

Thanks to a tip from

* Function to handle a sample field.
function phptemplate_views_handle_field_participants_users_name($fields, $field, $data) {
  $info = $fields[$field['fullname']];

GMap not showing up (markers and controls, but map is gray) due to validation errors

This problem is only in IE6, because it's evil.

First thing noticed: while the background was gray, and not a map, a single click to change the map style (road map, geo, or hybrid) the map would instantly appear.

So with the theme changed to bluemarine, the map shows up.

A, B, C, D... Ordered Lists in HTML with CSS

list-style-type: upper-alpha

See roottruth stylesheet for implementation.


Remember return $variables line in function _phptemplate_variables

So, it turns out that in your _phptemplate_variables($hook, $variables = array()) function in template.php, the return $variables line is very, very important.

As in your site self-destructs if you don't have it or accidentally comment it out.

Another helpful tip from Agaric Design Collective!

(And no, we don't learn these the hard way. Angels descend from heaven and whisper Drupal truths in our ears, complete with error output.)

Theme dropdown select form element

Adapted (taken) from All Drupal Themes:

form#place-taxonomy-terms-dropdown-form {
border: 1px solid #f2f2f2;
background-color: #FAFAFA;

form#place-taxonomy-terms-dropdown-form input,
form#place-taxonomy-terms-dropdown-form select {
padding: 1px;
border:1px solid #eee;
font: normal 1em "Trebuchet MS", Tahoma, sans-serif;

Making links in your theme work with Drupal localization

The name of the Agaric Design Collective member who screwed this up will go unmentioned. (The person who in the first version of this note forgot to put the print statements before the l() with t() function was me, though.)


<div class="lbutton"><a href="/findaction"><span class="buttn2">Find an Action</span></a></div>

Theming google map popups to use imagecache with Views and GMap module in Drupal

So you can pass in the imagecache presets namespace directly into your GMap view for use in pop-ups.

I had (apparently) figured this out a while ago but had Dan going through the code print_r'ing views variables to try to figure out where we could intercept the file ID and change the path to imagecache... and the path was already imagecache.

Any imagecache type you create can be chosen for CCK image

Moral of the story, when you're dealing with Views, assume it can be done through the user interface. There is full and amazing Imagecache support of Views.

Syndicate content