Michael R. Barrick's blog
Mon, 2011/03/28 - 10:31am
Election reform notion (not that I expect this to happen): ballots should be blank, no party names, not even candidate names. Voters have to write in who they want, legibly and correctly spelled. This would remove 99% of the stupid from elections such as people who are illiterate, people who vote for the party without even knowing the name of the MP running for their riding, and people who can't spell to save their lives.
The neo-cons would be in ruins.
Thu, 2011/03/24 - 11:59am
The Problem:
Displaying a random image from the image field in a certain node type (where not every node has an image) in a block.
My Solution:
1. First thing is create a view with the following "Default" settings:
Wed, 2011/03/23 - 10:31am
Tue, 2011/03/22 - 11:04pm
Sat, 2011/03/19 - 11:04pm
Sat, 2011/03/19 - 11:04am
Thu, 2011/03/17 - 1:51pm
Add the following function to the template.php for your theme:
function yourthemename_preprocess_page(&$vars, $hook) {
if (isset($vars['node'])) {
// If the node type is "blog" the template suggestion will be "page--blog.tpl.php".
$vars['theme_hook_suggestions'][] = 'page__'.$vars['node']->type;
}
}
Change the "yourthemename" in the function name to match the name of your theme.
Wed, 2011/03/16 - 11:04am
Pages