Skip to content

Instantly share code, notes, and snippets.

@gabrielmansour
Last active January 2, 2016 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielmansour/8247479 to your computer and use it in GitHub Desktop.
Save gabrielmansour/8247479 to your computer and use it in GitHub Desktop.
var a = [];
for (var i in localStorage){
if (localStorage.propertyIsEnumerable(i) && i.indexOf('dataset_')===0){
a.push( i.split('_')[1] );
}
}
$('#container').load([location.path, a.join('|')].join('/'));
<?php
function filter(){
if ($this->param('id')){
$ids = str_replace('|', ' OR ', $this->param('id'));
$this->query()->addFilterQuery("entity_id:($ids)");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment