Hi,
I am somehow trying to add an exposed filter to this view to give the visitor the possibility to search (with autocomplete) on product name.
I would like to position this exposed filter (by applying position:fixed left:X right:Y css selectors) on top of the page where now my standard drupal site search is positioned :
I was able to successfully add this new filter to the appropriate view :
but it seems impossible to have this filter rendered inside views-view--products--block-7.tpl.php
I have the impression, this is somewhere customized within the md_orenmode template file :
Could you point me out directions please how to enable/add my exposed filter inside your theme ?
Thanks upfront!
Could you send us your site url, admin account and FTP account? We would like to have a check and help you.
Please remember to check "Private message' for security reason :)
If you would like to place filter form at search form position, please take a look at following module: https://www.drupal.org/project/views_block_filter_block.
That module will create expose filters which display as blocks. You could drag drop block to region of search form and use CSS to style.
Hi Phuonght,
I already experimented with this module yesterday (before i posted this support ticket).
This module indeed enables an exposed block on Views display level, but unfortunately it contains all exposed filters as well as exposed sort criteria.
The result was that this orenmode customized block :
also moved completely into the new template block region.
Of course this was not my intention.
From an earlier mail i received from your colleague Cindy apparently she mentions something about this customized filter/sort block :
So maybe i have to add an additional DIV on top of the coding inside md_orenmode/template/custom/commerce-product-expose--filter.tpl.php
and/or md_orenmode/template/custom/commerce-product-expose--Sort.tpl.php
But i have no idea where to start, to get this exposed autocomplete search form rendered.
So any advice would be greatly appreciated. Thanks
At the moment, your views-view--products--block-7 is in region Content so when you create expose filter, it is placed in region Content of that view. If you would like expose filter display in another region, you need to create a block which has expose filter then assign it to region.
Hi, thanks for your response but i have given up trying to put the the exposed search from in another block. There's no way creating a block with only this 1 exposed filter separated from the rest in this view.
So here's what i came up with inside commerce-product-expose-sort.tpl.php :
After some styling it looks like this :
One problem still i cannot seem to solve immediately :
Once search filter is triggered, the path is set to "/?title=XYZ" instead of "/product-grid-sidebar?title=XYZ".
So i need to find a way to append the querystring ""/?title=XYZ" to the current URL as it is done with the other exposed sorts & filters below.
Where could this setting or hook be found ?
Please take a look at the following, we think it can help you change url of form:
https://www.drupal.org/node/2542056
Thanks for your reply. I tried your suggested approach but it didn't solve it.
This Views applied patch solved it partially. You can read my added comment here :
https://www.drupal.org/node/1069966#comment-10605122