Regions inside part


Is it possible to create regions inside parts?

We have a two column article view (part), where we would like to drag’n’drop parts in the right side column.

Parts XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <field-set name="article">
                <input name="article" type="ContentSelector">
                    <occurrences minimum="0" maximum="1"/>
        <region name="article_additionals"/>

Part controller:

function handleGet(req) {
    var component = execute('portal.getComponent');
    // 500: components.regions is undefined!

Hi Tommy

You can only have regions inside layouts or pages.

I think you can get what you want by creating a layout instead of a part.
Basically the difference between a layout and a part is that a layout can have regions.

See layouts here:

Jup, just change you part to a layout!

NB! There is currently a limit that disables placing layouts in layouts. We will remove this soon!

1 Like

That solved it!

Great, thanks!

1 Like

Great! I have been looking for the possibility of layouts in layouts. :smile: Will it be in 6.0, or will it come later?

1 Like

When will that limit be removed?

I would like to have a two column layout. And then within the right column I would like to put a form layout…

The documentation now says: “Layouts cannot be nested.”

So I guess I will have to make my two column layout a page with two regions, and then make the form as a layout.

But that could mean make a ton of pages.

Lets say you want:

Two columns with form to the right
followed by
Three column with a form in the middle

Really what is needed is a new type of region inside part, which only accepts parts.

Then I would simply make a form part, and drag N drop in input parts.

As a workaround I guess I could make a form start part and a form end part. And place whatever input parts between them.

I think I can forget that workaround idea:

The HTML generated by the part must have a single root element.

Which means I cannot put without in the same part…

I guess I could ignore html validation and do:





I’ll give it a try, but it will probably not work and is ugly as…

Yeah, scratch that workaround.