Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
msagolj committed Oct 9, 2024
1 parent 255bad3 commit dfe6e04
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 1 deletion.
35 changes: 35 additions & 0 deletions component-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,41 @@
"value": "highlight"
}
]
},
{
"component": "text",
"name": "fragment",
"label": "Fragent"
},
{
"component": "text",
"name": "fragment2",
"label": "Fragent"
}
]
},
{
"id": "page-metadata",
"fields": [
{
"component": "text",
"name": "template",
"label": "Template"
}
]
},
{
"id": "uetemplate-metadata",
"fields": [
{
"component": "text",
"name": "template",
"label": "Template"
},
{
"component": "text",
"name": "blue",
"label": "Second field Ue template only"
}
]
},
Expand Down
3 changes: 3 additions & 0 deletions models/_component-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
{
"...": "./_section.json#/models"
},
{
"...": "./_page-metadata.json#/models"
},
{
"...": "../blocks/*/_*.json#/models"
}
Expand Down
29 changes: 29 additions & 0 deletions models/_page-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"models": [
{
"id": "page-metadata",
"fields": [
{
"component": "text",
"name": "template",
"label": "Template"
}
]
},
{
"id": "uetemplate-metadata",
"fields": [
{
"component": "text",
"name": "template",
"label": "Template"
},
{
"component": "text",
"name": "blue",
"label": "Second field Ue template only"
}
]
}
]
}
10 changes: 10 additions & 0 deletions models/_section.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
"value": "highlight"
}
]
},
{
"component": "text",
"name": "fragment",
"label": "Fragent"
},
{
"component": "text",
"name": "fragment2",
"label": "Fragent"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/editor-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function setUEFilter(element, filter) {

function updateUEInstrumentation() {
// ----- if browse page, identified by theme
if (document.querySelector('body[class^=browse-]').hasAttribute('data-aem-template')) {
if (document.body.hasAttribute('data-aem-template')) {
document.createRange().createContextualFragment(`
<div class='template-banner'>
${document.body.dataset.aemTemplate}
Expand Down

0 comments on commit dfe6e04

Please sign in to comment.