In my page there is a content search webpart which displays data for each year. Now I have a drop down list in that same page (lets say inside a Content editor) which shows all years ie 2014,2013,2012 etc. There are two things which needs to be done:
By default when page loads the current year(2014) will be selected in dropdown and content search webpart will display only 2014 data.
On change of that dropdown list , i want the data in the content search webpart to show data for that particular year selected.
I have already set my mind for 2 approaches:
Send the year as a Querystring value and configure the content search webpart to get the value from querystring and filter data. On change of dropdownlist add new value to querystring and reload page.(not in favour of this since there are lot of other content also in that page)
Load all year data in the content search webpart and add a OOTB refinement panel with custom filter template to make it as a dropdownlist. when the dropdownlist selection changes no reload of page but refinement of the content search webpart data will be done.Also after loading the data, during page load using javascript i will have apply refinement to show 2014(maybe by triggering onchange event) .
Please help me make it better by giving some new ideas / refining what i have already stated. Any help would be highly appreciated.