import re
def content_menu(request):
+
menu_items = cache.get('bpcms_mainmenu')
if not menu_items:
pass
menu_items.sort( \
- cmp=lambda x,y: cmp(x['title'].lower(), y['title'].lower()))
+ key=lambda x: x['title'].lower())
cache.set('bpcms_mainmenu', menu_items, 3600)
return {
)
menu_items.sort( \
- cmp=lambda x,y: cmp(x['title'].lower(), y['title'].lower()))
+ key=lambda x: x['title'].lower())
- cache.set('bpcms_contentmenu_%s' %(folderpath), menu_items)
+ cache.set('bpcms_contentmenu_%s' %("/".join(folderpath)), menu_items)
return {
'content_submenu': menu_items,