user/plugins/simplesearch/simplesearch.php
/**
     * Set needed variables to display the search results.
                        
                         
                   
     */
Set needed variables to display the search results.
Set needed variables to display the search results .
public function onTwigSiteVariables()
    {
        $twig = $this->grav['twig'];
        if ($this->query) {
            $twig->twig_vars['query'] = $this->query;
            $twig->twig_vars['search_results'] = $this->collection;
        }
        if ($this->config->get('plugins.simplesearch.built_in_css')) {
            $this->grav['assets']->add('plugin://simplesearch/css/simplesearch.css');
        }
    }
public function onTwigSiteVariables ( ) { $ twig = $ this -> grav [ 'twig' ] ; if ( $ this -> query ) { $ twig -> twig_vars [ 'query' ] = $ this -> query ; $ twig -> twig_vars [ 'search_results' ] = $ this -> collection ; } if ( $ this -> config -> get ( 'plugins.simplesearch.built_in_css' ) ) { $ this -> grav [ 'assets' ] -> add ( 'plugin://simplesearch/css/simplesearch.css' ) ; } }
Set needed variables to display the search results.
Set needed variables to display the search results .
// $twig->twig_vars['query'] = implode(', ', $this->query);