Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

Custom block Property field did not display

Avatar

Level 1

I'm trying to create a property field ("text") inside my block. However, the field did not render as expected. Is there something missing from my json file?

{
  "definitions": [
    {
      "title": "Credit Cards",
      "id": "credit-cards",
      "plugins": {
        "xwalk": {
          "page": {
            "resourceType": "core/franklin/components/block/v1/block",
            "template": {
              "name": "Credit Cards",
              "filter": "credit-cards"
            }
          }
        }
      }
    },
    {
      "title": "Credit Card",
      "id": "credit-card",
      "plugins": {
        "xwalk": {
          "page": {
            "resourceType": "core/franklin/components/block/v1/block/item",
            "template": {
              "name": "Credit Card",
              "model": "credit-card"
            }
          }
        }
      }
    }
  ],
  "models": [
    {
      "id": "credit-cards",
      "fields": [
        {
          "component": "text",
          "name": "heading",
          "label": "Heading"
        }
      ]
    },
    {
      "id": "credit-card",
      "fields": [
        {
          "component": "aem-content-fragment",
          "name": "reference",
          "label": "Content Fragment Reference"
        },
        {
          "component": "aem-content",
          "name": "link",
          "label": "Path"
        },
        {
          "component": "text",
          "name": "linkText",
          "label": "Button Text"
        }
      ]
    }
  ],
  "filters": [
    {
      "id": "credit-cards",
      "components": ["credit-card"]
    }
  ]
}

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Definition of 'Credit Cards' should specify a model in order fetch the properties. After pushing, remove the existing block and add it back. You should see the property.

"template": {
              "name": "Credit Cards",
              "model": "credit-cards"
            }

  

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

Definition of 'Credit Cards' should specify a model in order fetch the properties. After pushing, remove the existing block and add it back. You should see the property.

"template": {
              "name": "Credit Cards",
              "model": "credit-cards"
            }

  

Avatar

Level 1

Already updated and is working. Thank you @HemanthSreenu!