This doc was last edited by Anand Chitipothu June 19, 2009.
plugin
upstream
Templates in the website are disabled now. Editing them will not have any effect on the live website.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$def with (fname, displayed_entries, selected_tokens)
$ fnew = []
$ n = len(displayed_entries)
$for i in range(n):
$ d = displayed_entries[i]
$if fname == 'has_fulltext':
$ pull = (int(d[0]) == 1)
$else:
$ pull = (facet_token(fname, d[0]) in selected_tokens)
$if pull:
$ fnew.append(d)
$ displayed_entries[i] = None
$ displayed_entries[slice(0,n)] = fnew + filter(bool, displayed_entries)
$'' |