From ab6c98f2d06c88ac75668b8909fecc6a2bb51f3b Mon Sep 17 00:00:00 2001 From: xidui <664984593@qq.com> Date: Mon, 13 Jun 2016 20:16:04 +0800 Subject: [PATCH] add switch for last posts in category view (#289) --- library.js | 5 +++-- templates/admin/plugins/persona.tpl | 6 ++++++ templates/partials/categories/item.tpl | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/library.js b/library.js index 2d6bd19..4495add 100644 --- a/library.js +++ b/library.js @@ -87,11 +87,12 @@ library.defineWidgetAreas = function(areas, callback) { }; library.getThemeConfig = function(config, callback) { - + meta.settings.get('persona', function(err, settings) { config.hideSubCategories = settings.hideSubCategories === 'on'; + config.hideCategoryLastPost = settings.hideCategoryLastPost === 'on'; }); - + callback(false, config); }; diff --git a/templates/admin/plugins/persona.tpl b/templates/admin/plugins/persona.tpl index d39dd72..37595d2 100644 --- a/templates/admin/plugins/persona.tpl +++ b/templates/admin/plugins/persona.tpl @@ -8,6 +8,12 @@ Hide subcategories on categories view +