jasteele123

concrete5 Search in Template

Aug 30th, 2011
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. <!-- concrete5 search in template -->
  2. <div id="search">
  3.   <form action="/search/search-results/" method="get">
  4.     <input name="search_paths[]" type="hidden" value="" />
  5.     <input class="searchBlockSearchField" name="query" type="text" value="" />
  6.     <input class="searchBlockSubmitButton" name="submit" type="submit" value="Search" />
  7.   </form>
  8. </div>
  9.  
  10. or in PHP:
  11.  
  12. <?php
  13. $bt_search = BlockType::getByHandle('search');
  14. $bt_search->controller->title = 'Search';
  15. $bt_search->controller->buttonText = 'Go';
  16. $bt_search->controller->baseSearchPath = '';
  17. $bt_search->controller->resultsURL = 'search-results';
  18. $bt_search->render('view');
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment