Disable the default djangocms_blog menu in case the user does not want to show submenus
This commit is contained in:
parent
94896db873
commit
c1c8fc905b
1 changed files with 3 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ from menus.menu_pool import menu_pool
|
||||||
|
|
||||||
from .cms_appconfig import BlogConfig
|
from .cms_appconfig import BlogConfig
|
||||||
from .models import BlogCategory, Post
|
from .models import BlogCategory, Post
|
||||||
from .settings import MENU_TYPE_CATEGORIES, MENU_TYPE_COMPLETE, MENU_TYPE_POSTS, get_setting
|
from .settings import MENU_TYPE_NONE, MENU_TYPE_CATEGORIES, MENU_TYPE_COMPLETE, MENU_TYPE_POSTS, get_setting
|
||||||
|
|
||||||
|
|
||||||
class BlogCategoryMenu(CMSAttachMenu):
|
class BlogCategoryMenu(CMSAttachMenu):
|
||||||
|
|
@ -59,6 +59,8 @@ class BlogCategoryMenu(CMSAttachMenu):
|
||||||
categories_menu = True
|
categories_menu = True
|
||||||
if config and config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_POSTS):
|
if config and config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_POSTS):
|
||||||
posts_menu = True
|
posts_menu = True
|
||||||
|
if config and config.menu_structure in (MENU_TYPE_NONE, ):
|
||||||
|
return nodes
|
||||||
|
|
||||||
used_categories = []
|
used_categories = []
|
||||||
if posts_menu:
|
if posts_menu:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue