getRequest()->getParam('q')); } /** * Prepare posts collection * * @return void */ protected function _preparePostCollection() { parent::_preparePostCollection(); $this->_postCollection->addSearchFilter( $this->getQuery() ); } /** * Preparing global layout * * @return $this */ protected function _prepareLayout() { $title = $this->_getTitle(); $this->_addBreadcrumbs($title, 'blog_search'); $this->pageConfig->getTitle()->set($title); $this->pageConfig->setRobots('NOINDEX,FOLLOW'); return parent::_prepareLayout(); } /** * Retrieve title * @return string */ protected function _getTitle() { return __('Search "%1"', $this->getQuery()); } }