Developer forum

Forum » Templates » Designs & Layout - Layout inheritance

Designs & Layout - Layout inheritance


Reply
Hi Dynamicweb.

Nice presentation about the new website-in-10-min-layout way of working with DW.

I am currently using the Design & Layouts.

Let say I have a structure:

Main Page --> Layout 1
- Sub Page
- Sub Page
- Sub Page
Main Page 2 -> Layout 2
- Sub Page
- Sub Page
- Sub Page

How to get the subpages to inherit the layout from the main pages instead of the defined default layout in the Frontend module?

Kind Regards,

Pim

Replies

 
Reply
If you are able to use the same html for all pages, then you can set a class on your html body to style a top page and its subpages. You can use <!--@Global:Page.Top.ID--> for this.

If you need different html for the pages... I have no idea what to do. Maybe we need a checkbox for inheritance? :)

/Morten
 
Reply
Hi Morten,

Again, not exactly what I meant....

1. Define new layout in Template/Designs with 2 layout (home, content e.d.)
2. Apply to Language Layer (or in frontend module)
3. Apply different Layour for one level with multiple subpages
4. See what happens to the layout inheritance of the subpages

This has nothing to do with styling in HTML with CSS, but using Layouts in the backend of Dynamicweb.

Kind Regards,

Pim
 
Reply
AFAIK, designs do - by design - not bubble down to child pages. Any page that does not explicitly set the layout gets the one you specify for the frontpage or web site.

Kind regards,

Imar
 
Reply
Hi Imar,

Thanks for your quick reply. So let's say I'm working with 251 pages, 3 different layouts, 1 page is a Homepage layout and 125 pages are of another layout. You say I'm forced to manually attach the third layout to 125 pages?

Kind Regards,

Pim
 
Reply
Hi Pim,

You are absolutely right. It should be possible to choose layouts for sections of a site where the layout is inherited by subpages.

+1 vote from me :)
 
Nicolai Høeg Pedersen
Reply
OK - coming up. With 7.2 if can make it or with a SR quickly after.
 
Reply
Hi Nicolai and Morten,

Thanks for your quick reply! Nice to see your commitment!

I really hope to be able to install the Dyanmicweb 7.2. oktober... uuuhm winter release before my internal project deadlines ;)

Thanks and kind regards! :D

Pim
 
Nicolai Høeg Pedersen
Reply
Hi Pim

This feature has now been added to 7.2

See screen dump attached. You simply click a checkbox - then the selected template will be applied runtime on subpages - also new ones below.

On the pages you can see which is inherited for debugging purposes.
LayoutInheritance.PNG

 

You must be logged in to post in the forum