Search Module: select layout

edited August 2015 in Modules
Hi,
is it possible do render the search results page via a layout instead of the predefined view file?

Comments

  • edited 3:42AM
    You can specify a different layout for your view file by specifying the following at the top of the search view:
    <?php fuel_set_var('layout', 'search_layout')?>
  • edited 3:42AM
    then the normal layout library is loaded? So that I can hand over some variables via the layout class?
  • edited 3:42AM
    If you look in the fuel/modules/search/controllers/search.php controller file, you can see how it simply is just calling:
    $this->fuel->pages->render('search', $vars);
    FUEL allows you to set the layout both by passing a $vars['layout'] value OR by setting it in the view file that is being rendered.
Sign In or Register to comment.