Hi
I have been some doubts regarding search bar.
Now i have created a new layout search1 of the jbzoo filter and i want to integrate it into the place of my native search bar.
To do so-
1) I can change the class of the jbzoo filter to the ones used in my template. But i doubt the location of the file and i think it might hinder the working of other filters. So what do you suggest in this?
2) If i create new classes for the search1 using the id and class then there are problems-
a) I need to remove one div and create new styles for rest of elements. The div that needs to be removed is <div class="jbzoo jbzoo-filter-wrapper">
Now removing this div will also require me to edit the main file as i tried to use
.parent{display:none!important}
.child{display:block!important}
But thats also not working
<div class="uk-navbar-content uk-hidden-small">
<script type="text/javascript">
jQuery(function ($) {
$('#jbzoo-filter-search1-99 select, #jbzoo-filter-search1-99 input[type=radio], #jbzoo-filter-search1-99 input[type=checkbox]').change(function () {
$(this).closest("form").submit();
});
});
</script>
<div class="jbzoo jbzoo-filter-wrapper">
<form class="jbzoo-filter filter-search1" id="jbzoo-filter-search1-99" method="get" action="/mobiles" name="jbzoo-filter-search1-99">
<div class="filter-fields">
<!--
User fields
-->
<div class="filter-element element-_auto_ first">
<div class="field">
<input type="text" name="e[_itemname]" value="" id="filterEl__itemname" class="element-itemname element-tmpl-_auto_ jsAutocomplete ui-autocomplete-input" multiple="multiple" size="60" maxlength="255" placeholder="What are you shopping for?" autocomplete="off"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
</div> <div class="clear clr"></div>
</div>
<div class="clear clr"></div>
<!--
Static fields
-->
<div class="static-fields">
<input type="hidden" name="limit" value="20">
<input type="hidden" name="order" value="none">
<input type="hidden" name="logic" value="and"> </div>
</div>
<!--
Submit and reset buttons
-->
<div class="controls">
<div class="clear clr"></div>
</div>
<!--
System required fields
-->
<input type="hidden" name="controller" value="search">
<input type="hidden" name="Itemid" value="138">
<input type="hidden" name="option" value="com_zoo">
<input type="hidden" name="task" value="filter">
<input type="hidden" name="exact" value="1">
<input type="hidden" name="type" value="mobiles" class="jsItemType">
<input type="hidden" name="app_id" value="1" class="jsApplicationId">
</form>
</div>
</div>
b) Even when i change the css class after removing div then also i am not able to achieve the full functionality of the native search bar
But when i changed the class of the div and form to that of my template then i was able to achieve everything successfully. The code is
<form class="uk-search" id="jbzoo-filter-search1-99" method="get" action="/mobiles" name="jbzoo-filter-search1-99">
<div class="filter-fields">
<!--
User fields
-->
<div class="filter-element element-_auto_ first">
<div class="field">
<input type="text" name="e[_itemname]" value="" id="filterEl__itemname" class="uk-search-field element-tmpl-_auto_ jsAutocomplete ui-autocomplete-input" multiple="multiple" size="60" maxlength="255" placeholder="What are you shopping for?" autocomplete="off"><span role="status" aria-live="polite" class="ui-helper-hidden-accessible">3 results are available, use up and down arrow keys to navigate.</span>
</div> <div class="clear clr"></div>
</div>
<div class="clear clr"></div>
<!--
Static fields
-->
<div class="static-fields">
<input type="hidden" name="limit" value="20">
<input type="hidden" name="order" value="none">
<input type="hidden" name="logic" value="and"> </div>
</div>
<!--
Submit and reset buttons
-->
<div class="controls">
<div class="clear clr"></div>
</div>
<!--
System required fields
-->
<input type="hidden" name="controller" value="search">
<input type="hidden" name="Itemid" value="138">
<input type="hidden" name="option" value="com_zoo">
<input type="hidden" name="task" value="filter">
<input type="hidden" name="exact" value="1">
<input type="hidden" name="type" value="mobiles" class="jsItemType">
<input type="hidden" name="app_id" value="1" class="jsApplicationId">
</form>
Please suggest what should be done
thanks