User login

Drupal Theming

How to theme a Drupal form

Update: This tutorial has been revised significantly to provide a robust solution consistently works.

Define a function named your_theme_name_ or phptemplate_ plus name_of_form($form).

A silly trip through the innards of views theming: output plain link with no HTML

Spoiler: if you want a plain value of a field to be output plain without surrounding <div class="field-item"> tags, make sure to select "Do not group multiple values".

Now for the masochists, let's follow how I found this out the really, really, really hard way!

Amazing what's available to a simple view in Drupal 5.

A views-list-agaric_view_name.tpl.php with the following sole contents:

Use just the body field in the view of a CCK node

This requires theming the view. Views does not know about or provide just the raw body, so you have to theme the view, load the node, and grab the body field.

In your view-....tpl.php:

<?php
 
$fullnode = node_load($node->nid);
print check_markup($fullnode->body, $fullnode->format, FALSE);
?>

THIS HAS SIGNIFICANT PERFORMANCE IMPLICATION FOR MANY NODES WITH MANY FIELDS

Display a Drupal login form anywhere with PHP, including in page content

Update: I gave slightly incorrect code, I'm pretty sure swapping out 'user_register' to put in 'user_login' will work just fine:

dan hak 3:08
whats the code for the login block

benjamin melançon 3:09

List styling frustration: removing bullets

(Ran into similar problems adding images. Is it a matter of a more specific rule somewhere overriding it?)

ul#agariclist list-style-type: none;

not related i don't think but damned if i know anything anymore

#homepage .panel-col-first .view-data-field-action-shot-fid .item-list {
  list-style: none;
}

#homepage .panel-col-first .view-banner .view-data-field-action-shot-fid .item-list li {
  list-style: none;
}

How to theme (lots of) views the Agaric Way

I3IVIIVI: now, take a look at the template.php file
(10:20:54 AM) Dan Hak: you took out repeating code?
(10:21:15 AM) I3IVIIVI: yes, exactly
(10:21:22 AM) I3IVIIVI: the code that you knew was repeating
(10:21:35 AM) I3IVIIVI: because you weren't even copying it from the wizard anymore
(10:21:49 AM) I3IVIIVI: you were just changing that one spot :-)
(10:22:11 AM) I3IVIIVI: it was actually harder to refactor than I thought. I shouldn't have done it now

Background graphics not displaying in IE6 due to use of padding instead of width and height values

Some IE6 fixes did not require browser detection

Wrong (as far as IE6 is concerned)

a#emailalerts_button {
display: block;
background: url('images/alerts.gif') 0% 0px;
padding: 135px 0px 0px 130px;
vertical-align: bottom;
}

Right (for everything as far as we can test)

a#emailalerts_button {
display: block;
background: url('images/alerts.gif') 0% 0px;
padding: 0;
width: 135px;
height: 130px;
vertical-align: bottom;
}

Syndicate content