I want to do something like
$('a.filter-link').click(function(e) {
e.preventDefault();
var that = $(this),
categoryId = that.data('id'),
categoryName = that.data('catname');
$('div.results').load("{path='ums/performances-results/<I WANT var categoryName here>'}", {category: categoryId, ajax: true});
});
How do I place the variable there? This is inline in the template pages, so I know {path=’ums/performances-results’} works, but I need this to be dependent on the last_segment variable. I just want to render a particular template so I don’t have to refresh the whole page when filtering a result set. Thanks.
You can’t mix EE tags and JavaScript. Part of the EE codebase tries to identify the difference between JavaScript curly brackets and EE brackets. Sometimes it fails, so we have to help it by structuring the EE bits separately and not mixing with similar JS brackets.
Does the following work?
Have you also tried just putting /ums/performances-results/ instead of using the path call in EE?