Developer forum

Forum » Templates » default:true on a dwcontent not applied when changing layouts

default:true on a dwcontent not applied when changing layouts


Reply
Hi there,

I have two layouts, each with two dwcontent placeholders. The first layout has a Menu and a MainContent placeholder and the MainContent placeholder has a settings attribute of "default:true".

The second layout has two dwcontent placeholders called Left and Right. On Left, I applied a settings="default:true" attribute. It seems this latter setting is not applied when I switch from the first to the second layout like this:

1. Create a new page and apply the first layout
2. Create two paragraphs; both end up in MainContent automatically
3. Open the page's Properties and switch to the second layout.

My two paragraphs now end up in the Right placeholder; not in the Left placeholder as I was expecting based on its default:true setting.

Bug or by design?

Imar

Replies

 
Nicolai Høeg Pedersen
Reply
If a paragraph is not attached to a specific or existing content placeholder ID (Paragraph table ParagraphContainer field = content placeholder ID) it should be placed in the default content placeholder, otherwise not.

If it does not work like that, it is a bug.
 
Reply
Well, it looks like it's not being put in the correct placeholder because it has an assigned ID from the previously applied layout (or so it seems).

I attached the design so you can take a look. To repro:

1. Assign OneColumnMainContent as the main layout on the homepage module

2. Create a brand new page with two paragraphs. Both are placed in MainContent as dictated by the default: true setting.

3. Open the properties of the page and change to the Index layout

4. The two paragraphs should end up in Left, but on my machine they end up in Right.

Do you see the same behavior?

Imar

 

You must be logged in to post in the forum