Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By testy on
I am learning how to adapt an existing theme (Zen 960 sub theme). Our branding requires two logos in the header. Both logos need to be clickable and linked to different URLs. I am already using css to put a background image behind the logos. I have altered the page.tpl file to call a new variable $u_logo. How do I add this new variable to the database and get Drupal to recognize it?
<div id="headerLeft" class="grid-8 alpha clear-block">
<a href="http://www.utah.edu"><img src="<?php print $u_logo; ?>" alt="The University of Utah" width="70" height="65" border="0" /></a>
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
</a>
<!-- end headerLeft -->
</div>
Any help would be appreciated.
Comments
CCK + Views
I'm totally beginner but in my case for every missing element, I'm building block with CKK and Views module. I believe this is lame, but right now is the only way that I can solve issues like that.
You could make another
You could make another variable for your page.tpl.php file in the preprocess_page function in your template.php file.
For instance in template.php:
You wouldn't be adding the second logo to your database, though. The image file would live in your theme folder.