Referencing search block programatically

Permalink
Hi, I want to include a search option in a theme I am working on. So how do I go about referencing this block in my code?
Thanks.

 
russgrue replied on at Permalink Best Answer Reply
I figured it out.... The code is as follows....

<?php
    $bt = BlockType::getByHandle('search');
    $bt->controller->title = 'Search Site';
    $bt->controller->buttonText = 'Search';
    $bt->controller->baseSearchPath = '';
    $bt->controller->resultsURL = '/search';
    $bt->render('view');
?>


Hope it helps someone.

Russ