I have a page with blog listed with pagination using craft paginate.
{% paginate craft.entries.section(['blog']).orderBy('postDate desc').limit(15) as pageInfo, entryTemplates %}
Now I am need of filter with categories using ajax, so that on clicking the category, blogs based on the category will be listed.
I want to know how this happen with ajax. To where we will redirect the ajax request because we are not using any plugin.
$.ajax({
type: 'get',
url: test/getFilteredData, // Where we will define this controller and action in craft 3
data: {},
processData: true,
success: function(result){}
})
so that from that url we will return the filtered data and displayed back. Thanks in advance.