Custom block Property field did not display | Community
Skip to main content
September 24, 2025
Solved

Custom block Property field did not display

  • September 24, 2025
  • 1 reply
  • 253 views

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"] } ] }

 

Best answer by HemanthSreenu

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" }

  

1 reply

HemanthSreenu
HemanthSreenuAccepted solution
Level 2
September 24, 2025

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" }

  

adkfnyurAuthor
September 24, 2025

Already updated and is working. Thank you @hemanthsreenu!