Hi All,

I'm working on a theme and would like to take advantage of the title_suffix and title_prefix variables. I can't figure out how they're supposed to be used. Here's what I've got in my theme file (this is a straight copy out of the Stark theme):

		        <?php print render($title_prefix); ?>
		        <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
		        <?php print render($title_suffix); ?>

I see that $title_prefix is supposed to be a "renderable array" according to the docs, so then, in my preprocess function I tried doing this:

$vars['title_prefix'][] = 'Some prefix here!';

But nothing gets printed out. If I do this:

$vars['title_prefix'] = 'Some prefix here!';

Then it works--but I obviously don't have an array at that point. How can I do this right?

-Josh

Comments

duckzland’s picture

try

$vars['title_prefix']['mytitle']['#markup'] = 'Some prefix here!';

--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com