File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -277,14 +277,14 @@ JSON used for this template:
277
277
278
278
```
279
279
{
280
- 0: {
280
+ options: [ {
281
281
"selected": true,
282
282
"value": "grid"
283
283
},
284
- 1: {
284
+ {
285
285
"selected": false,
286
286
"value": "list"
287
- }
287
+ }]
288
288
}
289
289
```
290
290
@@ -531,6 +531,8 @@ JSON used for this template:
531
531
,setDefaultFilters : function(){
532
532
//to make the results by default sorted by quantity
533
533
this.addQueryParam('sort',"quantity desc");
534
+ //to make default filter by category shoes
535
+ this.addFilter('category_fq', 'shoes');
534
536
}
535
537
...
536
538
```
Original file line number Diff line number Diff line change @@ -466,16 +466,17 @@ var unbxdSearchInit = function(jQuery, Handlebars){
466
466
'{{/options}}' ,
467
467
'</select>'
468
468
] . join ( '' ) ,
469
- viewTypeContainerTemp :
470
- '{{#options}}'
471
- + '<li class="unbxd-{{#if selected}}current{{/if}}">'
472
- + '<a title="{{value}} View" class="unbxd-{{value}}view-button" {{#unless selected}}unbxdviewtype="{{value}}"{{/unless}}>'
473
- + '<span class="icon-{{value}}view">'
474
- + '{{value}}{{#if selected}}-current{{/if}}'
475
- + '</span>'
476
- + '</a>'
477
- + '</li>'
478
- + '{{/options}}'
469
+ viewTypeContainerTemp : [
470
+ '{{#options}}' ,
471
+ '<li class="unbxd-{{#if selected}}current{{/if}}">' ,
472
+ '<a title="{{value}} View" class="unbxd-{{value}}view-button" {{#unless selected}}unbxdviewtype="{{value}}"{{/unless}}>' ,
473
+ '<span class="icon-{{value}}view">' ,
474
+ '{{value}}{{#if selected}}-current{{/if}}' ,
475
+ '</span>' ,
476
+ '</a>' ,
477
+ '</li>' ,
478
+ '{{/options}}'
479
+ ] . join ( '' )
479
480
} ;
480
481
481
482
jQuery . extend ( Unbxd . setSearch . prototype , {
You can’t perform that action at this time.
0 commit comments