Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Content service model exporter not returning all the data

Avatar

Level 2

Hi All,

I have been looking into JSON exporter feature provided by AEM 6.3+

For example http://localhost:4502/content/we-retail/us/en/men.model.json

returns below JSON data, I observed that some of the important data is not exposed properly

For example Look for element

category_teaser_465639357: {

  • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
  • :type: "cq/personalization/components/target",
  • strategyName: "first",
  • cq:targetEngine: "cq_contexthub",
  • strategyPath: "cq/personalization/clientlib/source/strategies/list/first.js",
  • location: "d2878954-431c-4f51-8465-7c6653344545"
  • }

Corresponding path in repo is as below

/content/we-retail/us/en/jcr:content/root/responsivegrid/category_teaser_465639357

and have child nodes like default which have critical data which needs to be exposed to frontend like "buttonLabel" etc.

I have following questions:

1.Above explained case is it bug?

2. Above is just any example but how this content as service deals which different kind of node storage structure, if the process of extracting JSON is very tightly coupled to how nodes are stored then I feel it is not very useful.

3. Also it is possible to understand the code flow for how currently AEM is extracting the JSON from page so I can debug and extend it so that it can be useful to us.

I was assuming that model selector must be hitting the a servlet but looks like it starts from a filter or it just handled in Default GET servlet. Any high level code flow and entry point to this implementation would be helpful.

4. Also how we deal with concept like inherited content when we use content as service.

5. Also to find the overall structure of the page I think implementation is doing look up for conf folder

/conf/we-retail/settings/wcm/templates/content-page

6. For path like /content/we-retail/us/en/jcr:content/root/responsivegrid/articles_list

where we are trying to get some child resource how this services knows where to get this data from? All these response fetching and adding is happening in code or we have generic utilities to achieve or it.

Sorry for too many questions but if we are going to use the headless approach it should be more easy to understand for our developers so we can extend and utilize it currently it is more of a black box or as I just started looking into this feature it might be my ignorance.

Thank you,

Shehjad

{

  • designPath: "/etc/designs/we-retail",
  • title: "English",
  • lastModifiedDate: 1467202845038,
  • templateName: "hero-page",
  • language: "en",
  • :type: "weretail/components/structure/page",
  • :items:

    {

    },
    • root:
      {
      • columnCount: 12,
      • gridClassNames: "aem-Grid aem-Grid--12 aem-Grid--default--12",
      • :items:
        {
        • header: {},
          • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
          • :type: "weretail/components/structure/header",
          • theme: "inverse"
        • hero_image: {},
          • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
          • :type: "cq/personalization/components/target",
          • strategyName: "first",
          • cq:targetEngine: "cq_contexthub",
          • strategyPath: "cq/personalization/clientlib/source/strategies/list/first.js",
          • location: "2b493aca-8345-4fc1-be72-75535f1f8c0a"
        • responsivegrid:
          {
          • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
          • columnCount: 12,
          • gridClassNames: "aem-Grid aem-Grid--12 aem-Grid--default--12 aem-Grid--phone--12",
          • :items:
            {
            • section_title_496791378: {},
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
              • type: "h2",
              • text: "Discover the Finest Gear",
              • :type: "weretail/components/content/title"
            • category_teaser: {},
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
              • :type: "cq/personalization/components/target",
              • strategyName: "first",
              • cq:targetEngine: "cq_contexthub",
              • strategyPath: "cq/personalization/clientlib/source/strategies/list/first.js",
              • location: "eadebf73-f250-47b5-8d35-b42479c81dca"
            • category_teaser_859708776: {},
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
              • :type: "cq/personalization/components/target",
              • strategyName: "first",
              • cq:targetEngine: "cq_contexthub",
              • strategyPath: "cq/personalization/clientlib/source/strategies/list/first.js",
              • location: "ee033a3d-c7a2-4a80-9aa6-5db4aef6bdeb"
            • category_teaser_465639357: {},
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
              • :type: "cq/personalization/components/target",
              • strategyName: "first",
              • cq:targetEngine: "cq_contexthub",
              • strategyPath: "cq/personalization/clientlib/source/strategies/list/first.js",
              • location: "d2878954-431c-4f51-8465-7c6653344545"
            • site_feature: {},
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
              • :type: "weretail/components/content/sitefeature",
              • jcr:description: "And free return",
              • icon: "shoping-cart-alt",
              • jcr:title: "Free delivery"
            • site_feature_465639357: {},
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
              • :type: "weretail/components/content/sitefeature",
              • jcr:description: "Worldwide shipping",
              • icon: "compass",
              • jcr:title: "Order tracking"
            • site_feature_859708776: {},
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
              • :type: "weretail/components/content/sitefeature",
              • jcr:description: "With our outdoor specialist",
              • icon: "headphones",
              • jcr:title: "Online support"
            • section_title: {},
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
              • type: "h2",
              • text: "Featured Products",
              • :type: "weretail/components/content/title"
            • products_grid:
              {
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
              • dateFormatString: "yyyy-MM-dd",
              • items:
                [
                • {},
                  • path: "/content/we-retail/us/en/products/women/coats/sleek-insulated-coat",
                  • pageTitle: null,
                  • name: "sleek-insulated-coat",
                  • description: null,
                  • title: "Sleek Insulated Coat"
                • {},
                  • path: "/content/we-retail/us/en/products/men/coats/el-gordo-down-jacket",
                  • pageTitle: null,
                  • name: "el-gordo-down-jacket",
                  • description: null,
                  • title: "El Gordo Down Jacket"
                • {},
                  • path: "/content/we-retail/us/en/products/men/shirts/expedition-tech-long-sleeved-shirt",
                  • pageTitle: null,
                  • name: "expedition-tech-long-sleeved-shirt",
                  • description: null,
                  • title: "Expedition Tech Long-Sleeved Shirt"
                • {},
                  • path: "/content/we-retail/us/en/products/men/pants/trail-model-pants",
                  • pageTitle: null,
                  • name: "trail-model-pants",
                  • description: null,
                  • title: "Trail Model Pants"
                • {},
                  • path: "/content/we-retail/us/en/products/equipment/biking/marin-mountain-bike-shoes",
                  • pageTitle: null,
                  • name: "marin-mountain-bike-shoes",
                  • description: null,
                  • title: "Marin Mountain Bike Shoes"
                • {}
                  • path: "/content/we-retail/us/en/products/women/shirts/rios-t-shirt",
                  • pageTitle: null,
                  • name: "rios-t-shirt",
                  • description: null,
                  • title: "Rios T Shirt"
                ],

              • showDescription: false,
              • showModificationDate: false,
              • linkItems: false,
              • :type: "weretail/components/content/productgrid"
              },
            • section_title_431279162: {},
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
              • type: "h2",
              • text: "Our Top Stories",
              • :type: "weretail/components/content/title"
            • articles_list:

              {

              },
              • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
              • dateFormatString: "yyyy-MM-dd",
              • items:
                [
                • {},
                  • path: "/content/we-retail/us/en/experience/arctic-surfing-in-lofoten",
                  • pageTitle: null,
                  • name: "arctic-surfing-in-lofoten",
                  • description: null,
                  • title: "Arctic Surfing In Lofoten"
                • {},
                  • path: "/content/we-retail/us/en/experience/summit-success-in-the-himalayas",
                  • pageTitle: null,
                  • name: "summit-success-in-the-himalayas",
                  • description: null,
                  • title: "Summit Success in the Himalayas"
                • {},
                  • path: "/content/we-retail/us/en/experience/climbing-on-kalymnos-island--greece",
                  • pageTitle: null,
                  • name: "climbing-on-kalymnos-island--greece",
                  • description: null,
                  • title: "Climbing on Kalymnos Island, Greece"
                • {},
                  • path: "/content/we-retail/us/en/experience/running-at-the-great-wall-marathon",
                  • pageTitle: null,
                  • name: "running-at-the-great-wall-marathon",
                  • description: null,
                  • title: "Running at the Great Wall Marathon"
                • {},
                  • path: "/content/we-retail/us/en/experience/skiing-deep-powder-in-siberia",
                  • pageTitle: null,
                  • name: "skiing-deep-powder-in-siberia",
                  • description: null,
                  • title: "Skiing deep powder in Siberia"
                • {}
                  • path: "/content/we-retail/us/en/experience/climbing-in-the-massif-du-mont-blanc",
                  • pageTitle: null,
                  • name: "climbing-in-the-massif-du-mont-blanc",
                  • description: null,
                  • title: "Climbing in the Massif du Mont Blanc"
                ],

              • showDescription: false,
              • showModificationDate: false,
              • linkItems: false,
              • :type: "weretail/components/content/articleslist"
          • section_title_239098915: {},
            • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
            • type: "h2",
            • text: "New arrivals",
            • :type: "weretail/components/content/title"
          • products_grid_1773541649:

            {

            },
            • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
            • dateFormatString: "yyyy-MM-dd",
            • items:
              [
              • {},
                • path: "/content/we-retail/us/en/products/women/coats/sleek-insulated-coat",
                • pageTitle: null,
                • name: "sleek-insulated-coat",
                • description: null,
                • title: "Sleek Insulated Coat"
              • {},
                • path: "/content/we-retail/us/en/products/men/coats/el-gordo-down-jacket",
                • pageTitle: null,
                • name: "el-gordo-down-jacket",
                • description: null,
                • title: "El Gordo Down Jacket"
              • {},
                • path: "/content/we-retail/us/en/products/men/shirts/expedition-tech-long-sleeved-shirt",
                • pageTitle: null,
                • name: "expedition-tech-long-sleeved-shirt",
                • description: null,
                • title: "Expedition Tech Long-Sleeved Shirt"
              • {},
                • path: "/content/we-retail/us/en/products/men/pants/trail-model-pants",
                • pageTitle: null,
                • name: "trail-model-pants",
                • description: null,
                • title: "Trail Model Pants"
              • {},
                • path: "/content/we-retail/us/en/products/equipment/biking/marin-mountain-bike-shoes",
                • pageTitle: null,
                • name: "marin-mountain-bike-shoes",
                • description: null,
                • title: "Marin Mountain Bike Shoes"
              • {}
                • path: "/content/we-retail/us/en/products/women/shirts/rios-t-shirt",
                • pageTitle: null,
                • name: "rios-t-shirt",
                • description: null,
                • title: "Rios T Shirt"
              ],

            • showDescription: false,
            • showModificationDate: false,
            • linkItems: false,
            • :type: "weretail/components/content/productgrid"
        • section_title_239098: {},
          • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
          • type: "h2",
          • text: "Join our Community",
          • :type: "weretail/components/content/title"
        • category_teaser_984780047: {},
          • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
          • :type: "weretail/components/content/categoryteaser",
          • fileReference: "/content/dam/we-retail/en/activities/hiking-camping/camp-summer-night.jpg",
          • buttonLabel: "Blog"
        • category_teaser_305030210: {},
          • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
          • :type: "weretail/components/content/categoryteaser",
          • fileReference: "/content/dam/we-retail/en/activities/climbing/ice-climbing-group.jpg",
          • buttonLabel: "Forum"
        • category_teaser_1388037983: {}
          • columnClassNames: "aem-GridColumn aem-GridColumn--default--4 aem-GridColumn--offset--default--0 aem-GridColumn--default--none aem-GridColumn--phone--12 aem-GridColumn--offset--phone--0 aem-GridColumn--phone--none",
          • :type: "weretail/components/content/categoryteaser",
          • fileReference: "/content/dam/we-retail/en/activities/biking/group-mountain-bikers.jpg",
          • buttonLabel: "Q&A"
        },
      • :itemsOrder: [],
        • "section_title_496791378",
        • "category_teaser",
        • "category_teaser_859708776",
        • "category_teaser_465639357",
        • "site_feature",
        • "site_feature_465639357",
        • "site_feature_859708776",
        • "section_title",
        • "products_grid",
        • "section_title_431279162",
        • "articles_list",
        • "section_title_239098915",
        • "products_grid_1773541649",
        • "section_title_239098",
        • "category_teaser_984780047",
        • "category_teaser_305030210",
        • "category_teaser_1388037983"
      • :type: "wcm/foundation/components/responsivegrid"
      },
    • footer: {}
      • columnClassNames: "aem-GridColumn aem-GridColumn--default--12",
      • :type: "weretail/components/structure/footer"
  • :itemsOrder: [],
    • "header",
    • "hero_image",
    • "responsivegrid",
    • "footer"
  • :type: "wcm/foundation/components/responsivegrid"

}},

  • :itemsOrder: []
    • "root"

}

0 Replies