if you want to know what goes to a view, always reference the last $data['search'] assignment.
In this case it depends which search bar you are referring to.
The common search bar is done via controller/common/search.php and it's associated view
Code: Select all
if (isset($this->request->get['search'])) {
$data['search'] = $this->request->get['search'];
} else {
$data['search'] = '';
}
Code: Select all
<input type="text" name="search" value="{{ search }}" placeholder="{{ text_search }}" class="form-control input-lg" />
the output of that controller is embedded in the controller/common/header.php via:
Code: Select all
$data['search'] = $this->load->controller('common/search');
The main search bar is done via controller/product/search.php and it's associated view
Code: Select all
if (isset($this->request->get['search'])) {
$search = $this->request->get['search'];
} else {
$search = '';
}
...... lots of stuff here ....
$data['search'] = $search;
Code: Select all
<input type="text" name="search" value="{{ search }}" placeholder="{{ text_keyword }}" id="input-search" class="form-control" />