Share HTML layouts between themes

Hi. I’m using an htmlBox with an html layout which is located in the extended halo theme. This works fine.

I now want to have multiple themes where each theme has some small styling modifications. I already created additional themes and included style definitions from the halo extended theme and then overriding some defaults/styling accordingly.

This all works fine only for the htmlBox; it seems I have to copy the html layouts to the new themes to get this working. However, the layouts are to my opinion more ‘code’ than ‘styling’ and should somehow be reused as much as possible.

Any suggestions how to solve this?

-b

Hi,

You could use htmlBox.templateContents property:

<htmlBox height="100%">
    <templateContents>
        <![CDATA[
            <h1> Demo </h1>
        ]]>
    </templateContents>
</htmlBox>

In this case your layout can be inlined in XML without additional files.

1 Like

That’s great! Didn’t know that was possible.

-b