<acms-related-entry-editor
  type="{related_type}"
  module-id="{{module_id}}"
  ctx="{{ctx}}"
  thumbnail="{{thumbnail}}"
  max-item="{{max_item}}"
  data-title="{{title}}"
  json-id="{related_type}-related-entries-json"
>
</acms-related-entry-editor>
<!-- BEGIN relatedAdminField -->
<script type="text/template" id="{related_type}-related-entries-json">
  [<!-- BEGIN {{block_name}} -->
    <!-- BEGIN related:glue -->, <!-- END related:glue -->
    {
      "id": {related.eid},
      "title": "{related.title}[jsonEscape|raw|allow_dangerous_tag]",
      "categoryName": "{related.categoryName}[jsonEscape|raw|allow_dangerous_tag]",
      "url": "{related.url}[jsonEscape|raw|allow_dangerous_tag]",
      "image": "<!-- BEGIN_IF [{related.path}/nem] -->%{HTTP_ROOT}{related.path}[jsonEscape|raw|allow_dangerous_tag|resizeImg(50)]<!-- ELSE -->%{HTTP_ROOT}themes/system/images/placeholder/image-16-9.svg<!-- END_IF -->"
    }
    <!-- END {{block_name}} -->
  ]
</script>
<!-- END relatedAdminField -->
