Back to index

plone3  3.1.7
filterCookie.py
Go to the documentation of this file.
00001 ##parameters=
00002 ##title=Manage filter cookie
00003 ##
00004 REQUEST=context.REQUEST
00005 if REQUEST.get('clear_view_filter', 0):
00006     context.clearCookie()
00007     REQUEST.set('folderfilter', '')
00008     REQUEST.set('close_filter_form', '1')
00009 elif REQUEST.get('set_view_filter', 0):
00010     filter=context.encodeFolderFilter(REQUEST)
00011     REQUEST.RESPONSE.setCookie('folderfilter', filter, path='/',
00012                                expires='Wed, 19 Feb 2020 14:28:00 GMT')
00013     REQUEST.set('folderfilter', '%s' % filter)