From 172466f5d1b26396634e4bfd22ad81f09af30acf Mon Sep 17 00:00:00 2001 From: Markus Haack Date: Wed, 18 Mar 2020 11:14:25 +0100 Subject: [PATCH 1/2] CIF-1319 - add optional title support for featured category component --- .../v1/featuredcategorylist/README.md | 2 - .../_cq_dialog/.content.xml | 72 ++++++++++--------- .../featuredcategorylist.html | 40 +++++------ 3 files changed, 56 insertions(+), 58 deletions(-) diff --git a/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/README.md b/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/README.md index b14d42b004..c35c8df235 100755 --- a/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/README.md +++ b/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/README.md @@ -58,8 +58,6 @@ BLOCK .cmp-categorylist ELEMENT cmp-categorylist__image ELEMENT cmp-categorylist__name ELEMENT cmp-categorylist__title - -BLOCK placeholder__empty ``` ## License information diff --git a/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/_cq_dialog/.content.xml b/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/_cq_dialog/.content.xml index 8ebf9a20ae..567805880f 100755 --- a/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/_cq_dialog/.content.xml +++ b/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/_cq_dialog/.content.xml @@ -1,46 +1,50 @@ - - - - + - - - + + diff --git a/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/featuredcategorylist.html b/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/featuredcategorylist.html index b8cebdb5a5..001c351ae7 100755 --- a/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/featuredcategorylist.html +++ b/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/featuredcategorylist.html @@ -15,26 +15,22 @@ */--> - -
-
-

- ${'Shop by category' @ i18n} -

-
- + data-sly-use.category="com.adobe.cq.commerce.core.components.models.categorylist.FeaturedCategoryList" + data-sly-use.templates="core/wcm/components/commons/v1/templates.html" /> + +
+
+

${properties.jcr:title}

+
+ - - - - - +
+ + + \ No newline at end of file From 36c7dc5e4968a33986e73a5089c7cd8580a63e48 Mon Sep 17 00:00:00 2001 From: Markus Haack Date: Wed, 18 Mar 2020 11:17:30 +0100 Subject: [PATCH 2/2] CIF-1319 - update readme --- .../featuredcategorylist/v1/featuredcategorylist/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/README.md b/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/README.md index c35c8df235..4fad152bf0 100755 --- a/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/README.md +++ b/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/featuredcategorylist/v1/featuredcategorylist/README.md @@ -34,16 +34,18 @@ Featured Category List component uses graphql query to fetch categories to displ This component has several dependencies on internal client-side modules. ### Usage prerequisites -Make sure you have dispatcher running with Magento url configured. See `dispatcher/README.md`. You should have the category images configured in your Magento instance. +Make sure you have dispatcher running with Magento url configured. See `dispatcher/README.md`. You should have the category images configured in your Magento instance. ### Use Object -The Featured category list component uses the `com.adobe.cq.commerce.core.components.models.categorylist.FeaturedCategoryList` Sling model as its Use-object. +The Featured category list component uses the `com.adobe.cq.commerce.core.components.models.categorylist.FeaturedCategoryList` Sling model as its Use-object. ### Edit Dialog Properties + The following properties are written to JCR for this component and are expected to be available as `Resource` properties: + `./jcr:title` - Optional title text `./categoryIds` - Category ids in an Array of string saved by Category Picker. ### CSS API (BEM)