Skip to content

Instantly share code, notes, and snippets.

@eikes
Created December 10, 2012 11:49
Show Gist options
  • Select an option

  • Save eikes/4250169 to your computer and use it in GitHub Desktop.

Select an option

Save eikes/4250169 to your computer and use it in GitHub Desktop.
facetedsearch settings with state object
var settings = {
state : {
"orderBy" : "lastname",
"filters" : {
"category" : ["Bird"],
"continent" : ["Africa"]
}
},
items : example_items,
facets : {
'category' : 'What Category',
'continent' : 'Which Continent',
'language' : 'Programming Language'
},
resultSelector : '#results',
facetSelector : '#facets',
resultTemplate : item_template,
orderByOptions : {
'firstname' : 'First name',
'lastname' : 'Last name',
'category' : 'Category',
'RANDOM' : 'Random'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment