Quick theme tip: abusing Drupal's $mission variable

<?php
 
// populate the $mission variable on every page so we can use it universally
  // don't check <front>, it's already handled in phptemplate.engine

 
if (!$vars['is_front']) {
   
$vars['mission'] = filter_xss_admin(theme_get_setting('mission'));
  }
?>

Blog Tags: DrupalThemes

Comments

That's a great idea. I've had clients install the theme settings api module for D5 to handle this kind of thing, but that's a bit too heavy if all you need is the copyright date.

Cool. I've used something similar:

$vars['mission'] = variable_get('site_mission', '');

Add new comment