4

We need to use two regions on our article pages. The article page has a 2-column layout. On the LHS column we have different kind of content.

The main type of content on LHS for example are:

  1. Article Content (Region : LHS-ArticleContent)

  2. Tabs (Region: LHS-ArticleTabs)

In the Page view, the regions are rendered like:

<dxa:region name="LHS-ArticleContent" />
<dxa:region name="LHS-ArticleTabs" /> 

This always will render the 'LHS-ArticleContent' Component presentations first and then the 'LHS-ArticleTabs'. Is there any way that both can be displayed at same level?

For. e.g. If Editors want to have content on page with below order:

  1. LHS-ArticleContent
  2. LHS-ArticleTabs
  3. LHS-ArticleContent
  4. LHS-ArticleTabs

How this blending can be achieved?

(We are using DXA 1.2 Java)

2

I'm not sure if I fully get the question, but from what I understand it sounds like you have created two regions, where you only need a single one.

If you want to have the following content in a region:

  1. LHS-ArticleContent
  2. LHS-ArticleTabs
  3. LHS-ArticleContent
  4. LHS-ArticleTabs

Then I would create a LHS region allowing both the ArticleContent and the ArticleTabs Schemas in that region. The specific order can then be determined by the authors directly on the page as is normally done.

But if what you actually mean in that you need four different regions on the page, where 1 & 3 and 2 & 4 are the same kind of region, then you will need to use different named regions for that currently. See http://docs.sdl.com/LiveContent/content/en-US/SDL%20DXA-v2/GUID-82C0A08C-55E7-4054-8911-937CFAFC7EB9 for details, this is a feature we added in DXA 1.2

  • Till now 'ArticleTabs' and 'ArticleContent' were in a single region for eg. LHS. However in a new case, tab content is now dependent on 2 schemas instead of one. So we had to create a new region for tabs for grouping them (supporting both tab schemas), hence this tricky situation. The link you shared above, does it have any examples I can refer to? – Huston Lopes Dec 21 '15 at 11:09
  • @HustonLopes no example other than those in our SmartTarget module I'm afraid, but you can have content based on multiple Schemas in a single regsion, that is used throught DXA from the beginning already. – Bart Koopman Dec 21 '15 at 11:20
  • ok no problem..so basically, I was looking for something like a sub-region within a region. – Huston Lopes Dec 21 '15 at 11:22
  • 1
    @HustonLopes no support for regions in regions yet, you could do that but it has to be programatically and might not end up to what you want, so I would look at other options like just having separate regions or one regions with support for multiple Schemas – Bart Koopman Dec 21 '15 at 12:32
  • The other two approaches are to "flatten" the content model and have the page template or view do the grouping or to use container components to group the items. – Alvin Reyes Dec 22 '15 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.