This seems an easy one, but I can't figure out how to display the site mission on every page, it only shows in the home page...

I am using a self-made php template, and I have the following line in page.tpl.php:

<?php if ($mission != ""): ?><div id="mission"><?php print $mission; ?></div><?php endif; ?>

Hope you can help me, TIA!

Comments

kuba.zygmunt’s picture

Hi,

Please try:

<?php 
$mission = theme_get_setting('mission', false);  
if ($mission != ""): ?>
<div id="mission"><?php print $mission; ?></div><?php endif; ?>

function theme_get_setting($setting_name, $refresh = FALSE) retrieves setting for actual theme :-)

- I wonder how am I perceived when passion enters me :-) -

gabble’s picture

Wonderful, it works!

Thank you thank you thank you!! :-)

kuba.zygmunt’s picture

I know it works :-) I've tested it :P

As the reward maybe you invite me to the Italy :P
- I wonder how am I perceived when passion enters me :-) -

gabble’s picture

Come to Italy and be my guest, I'll show you around! ;-)

inthahousejamin’s picture

This saved by bacon. Cheers :)

docker’s picture

Thank you so much!
It works fine!

a3arar’s picture

Hello,
I upgraded drupal, yet saved the old database. I am loading the old data into the new site, yet having difficulty finding some information in the old database. I would appreciate if you would be able to let me know where the mission statement loads, so I can retrieve it.
Thanks in advance.

stevenjia’s picture

Here is another way from http://drupal.org/node/358018#comment-1197349

function themename_preprocess_page(&$variables) {
      $variables['custom_mission'] = variable_get('site_mission', '');
}

I think it's a better way.

erifneerg’s picture

This was giving me a headache for 2hr and couldn't figure out why my mission statemnet wasn't showing up. It's under the theme config page. as seen in the image:
http://skitch.com/erifneerg/hc1j/mission