mhaack / helix-importer

Foundation tools for importing website content into that can be consumed in an Helix project.
Apache License 2.0
0 stars 3 forks source link

Add Support for key-value blocks #5

Closed bpauli closed 5 months ago

bpauli commented 5 months ago

We need to support key-value blocks during the html2jcr import

| Relatedposts                                          |
+============+==========================================+
| Title      | Related Articles                         |
+------------+------------------------------------------+
| Category   | ADOBE EXPERIENCE MANAGER, ADOBE COMMERCE |
+------------+------------------------------------------+
| Max Items  | 14                                       |
+------------+------------------------------------------+
| Sort Order | descending                               |
+------------+------------------------------------------+
{
          "title": "Relatedposts",
          "id": "relatedposts",
          "plugins": {
            "xwalk": {
              "page": {
                "resourceType": "core/franklin/components/block/v1/block",
                "template": {
                  "name": "Relatedposts",
                  "model": "relatedposts",
                  "key-value": true
                }
              }
            }
          }
        }

{
    "id": "relatedposts",
    "fields": [
      {
        "component": "text",
        "name": "title",
        "label": "Title"
      },
      {
        "component": "aem-tag",
        "name": "category",
        "label": "Category",
        "valueType": "string",
        "multi": true
      },
      {
        "component": "number",
        "name": "maxItems",
        "label": "Max Items"
      },
      {
        "component": "select",
        "name": "sortOrder",
        "label": "Sort Order",
        "options": [
          {
            "name": "Descending",
            "value": "descending"
          },
          {
            "name": "Ascending",
            "value": "ascending"
          }
        ]
      }
    ]
  }```
bpauli commented 5 months ago

fixed in #6