I have been trial/error and searching/reading for a couple hours, I decided to just come and ask.

How do I load a module into the page.tpl without using a block.

Search, menus, etc are done with code like this...

if ($search_box):

endif;

.....have attempted numerous variations... nothing.

THX in advance,
Grizz

Comments

pbarnett’s picture

<?php if ($search_box): ?>
  <?php print $search_box; ?>
<?php endif; ?>

should work, if you've enabled the drupal Search module.

Pete.

Grizz’s picture

I'm looking for a way to put another "enabled" module into page, without using a block.

i just used search as an example code

Grizz

pbarnett’s picture

That's not the question you asked :-)

But to answer it, add or modify the following function in your theme's template.php :

function yourtheme_preprocess_page(&$vars, $hook) {
  $vars['your_variable'] = your_function());
}

Pete.

Grizz’s picture

Thx Pete,

I was/am looking over at http://api.drupal.org/api/group/hooks/6

Someday I'll learn the lingo around here, nothing is in laymen s term anymore.

Grizz