From c1c8fc905b41618434849ae07ad6efd7a95040e7 Mon Sep 17 00:00:00 2001 From: Plamen Nikolov Date: Thu, 9 Nov 2017 23:30:30 +0200 Subject: [PATCH 1/8] Disable the default djangocms_blog menu in case the user does not want to show submenus --- djangocms_blog/cms_menus.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/djangocms_blog/cms_menus.py b/djangocms_blog/cms_menus.py index a31449b..a56f591 100644 --- a/djangocms_blog/cms_menus.py +++ b/djangocms_blog/cms_menus.py @@ -12,7 +12,7 @@ from menus.menu_pool import menu_pool from .cms_appconfig import BlogConfig 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): @@ -59,6 +59,8 @@ class BlogCategoryMenu(CMSAttachMenu): categories_menu = True if config and config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_POSTS): posts_menu = True + if config and config.menu_structure in (MENU_TYPE_NONE, ): + return nodes used_categories = [] if posts_menu: From e12705e6c5d6ffdbb8daf2a4ecf138326d2d8928 Mon Sep 17 00:00:00 2001 From: Plamen Nikolov Date: Thu, 9 Nov 2017 23:31:18 +0200 Subject: [PATCH 2/8] {% url 'djangocms_blog:posts-category' %} does not honor the app config. In case of multiple app configs, {% url .. %} points to the first config only --- djangocms_blog/templates/djangocms_blog/plugins/categories.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_blog/templates/djangocms_blog/plugins/categories.html b/djangocms_blog/templates/djangocms_blog/plugins/categories.html index 135a67b..5f7192c 100644 --- a/djangocms_blog/templates/djangocms_blog/plugins/categories.html +++ b/djangocms_blog/templates/djangocms_blog/plugins/categories.html @@ -3,7 +3,7 @@

{% trans "Categories" %}