From 08664003e006e7bdc1c7b0ee8eade1bde9960856 Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Fri, 30 Aug 2019 21:18:34 +0200 Subject: [PATCH] do hide hidden nested sub-items in block directives --- .../brothers.uNesting/uNesting.directives.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.directives.js b/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.directives.js index f1ea618..212b104 100644 --- a/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.directives.js +++ b/UmbracoPackages/App_Plugins/brothers.uNesting/uNesting.directives.js @@ -117,6 +117,11 @@ angular.module('umbraco.directives').directive('unMedia', function ($http, $comp titleCache[value] = item[scope.titleKey]; } + if (item['uNestingHide'] === '1') + { + return ''; + } + return value; }).join(','); } @@ -267,11 +272,14 @@ angular.module('umbraco.directives').directive('unBoxes', function ($compile) var headline = item[scope.titleKey]; - items.push({ - maxLines: headline ? max - 1 : max, - headline: headline, - text: item[scope.key] - }); + if (item['uNestingHide'] !== '1') + { + items.push({ + maxLines: headline ? max - 1 : max, + headline: headline, + text: item[scope.key] + }); + } } });