<?php  
class ControllerModuleBlogSearch extends Controller {
	protected function index() {
		$this->language->load('module/blog_search');
		
    	$this->data['heading_title'] = $this->language->get('heading_title');
    	
		$this->data['text_keyword'] = $this->language->get('text_keyword');
		$this->data['text_blog_title'] = $this->language->get('text_blog_title');
		$this->data['text_blog_description'] = $this->language->get('text_blog_description');
		
		$this->data['button_search'] = $this->language->get('button_search');
		
		//$this->load->model('catalog/blog_search');
		
		//$this->data['blog_searchs'] = array();

		//foreach ($this->model_catalog_blog_search->getBlogSearchs() as $result) {
      	//	$this->data['blog_searchs'][] = array(
        //		'title' => $result['title'],
	    //		'href'  => $this->url->link('blog_search/blog_search', 'blog_search_id=' . $result['blog_search_id'])
      	//	);
    	//}
		
		if (isset($this->request->get['blog_keyword'])) {
			$this->data['blog_keyword'] = $this->request->get['blog_keyword'];
		} else {
			$this->data['blog_keyword'] = '';
		}
		
		if (isset($this->request->get['filter_blog_title'])) {
			$this->data['filter_blog_title'] = $this->request->get['filter_blog_title'];
		} else {
			$this->data['filter_blog_title'] = 0;
		} 
		
		if (isset($this->request->get['filter_blog_description'])) {
			$this->data['filter_blog_description'] = $this->request->get['filter_blog_description'];
		} else {
			$this->data['filter_blog_description'] = 0;
		}
		
		//$this->data['contact'] = $this->url->link('blog_search/contact');
    	//$this->data['sitemap'] = $this->url->link('blog_search/sitemap');
		
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/blog_search.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/blog_search.tpl';
		} else {
			$this->template = 'default/template/module/blog_search.tpl';
		}
		
		$this->render();
	}
}
?>