Monday, January 11, 2010

Code for logo in Drupal

The following conditional statement enables the logo to be toggled on or off, wraps the image in an <a> tag and also sets the title and alt attributes.
if ($logo = theme_get_setting('logo')) {
$output .= " <a href=\"". url() ."\" title=\"". t('Home')
."\"><img src=\"$logo\" alt=\"". t('Home') ."\" /></a>";
}

No comments: