Using the NoMarkup xtype

I want to implement custom wrapper for a container, but I do not really understanbd how I can fullfill the first mentioned condition:

The content of the HST container is rendered as the only child HTML element of the enclosing HTML element, living in the parent component’s rendering template.

In my case the parent comonent is a component which references another component in an abstract (base) page. The component in the abstract page points to a template. That template contains additional child elements for header and footer.

If I understand the mentionend condition correct, this will not work- right?
My question is now, how must I implement to composition to include a NoMarkup Container?

An when I have a container like this, how must the template look like ?

/Content:
    jcr:primaryType: hst:containercomponent
    jcr:uuid: 1292b821-5fb7-4b72-bef7-42709ff48299
    hst:template: container
    hst:xtype: hst.nomarkup

Template ?:

<#include “…/…/include/imports.ftl”>
<div class=“container space-top-3” ‘>
<@hst.include ref=“Content”/>
</div’>

Sometimes describing problems help solve problems :slight_smile:

I changed my configration as following and now everthing works as expected:

/Content:
  jcr:primaryType: hst:component
  jcr:uuid: 22145b62-ba76-4d4f-bdd3-58b7c5696284
  hst:template: container
  /Container:
    jcr:primaryType: hst:containercomponent
    jcr:uuid: 0f2fd502-5b7c-4917-a272-88f650f6ac6c
    hst:lastmodified: 2019-10-31T06:59:00.327+01:00
    hst:xtype: hst.nomarkup
1 Like