def recent(request): """Most recent list of bookmarks capped at MAX""" rdict = request.matchdict # check if we have a page count submitted page = int(rdict.get('page', '0')) recent_list = BmarkMgr.recent(limit=RESULTS_MAX, with_tags=True, page=page) return { 'bmarks': recent_list, 'max_count': RESULTS_MAX, 'count': len(recent_list), 'page': page, 'allow_edit': access.edit_enabled(request.registry.settings), }