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 12:28PM
    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 12:28PM
    then the normal layout library is loaded? So that I can hand over some variables via the layout class?
  • edited 12:28PM
    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.