Choose fragments nestable in fragments drop-zone (and maybe choose wich fragment, directly from code)

What is the problem you are trying to solve?

Multiple drop-zones in fragments are very useful to create a “matrioska” composed website.

Anyway, the main limit of this approach is that is not possible to limit “what fragements could be nested”.

For example, in a Card fragment could be useful to insert a fragment that allows some specific link type (e.g. social ones, or phone/email with proper icon, or popup) but others (for example should be not possible to insert another card into one).

What is your project about? (e. g. Intranet, Partner Portal, Enterprise Website, etc)

Anyone (Portal and Commerce)

What is your proposed solution? (optional)

I think that two things could be useful

  1. As already said, the possibility to define “what fragments could be nested” similar to master page main drop-zone already existent

  2. To further improvements, trying to limit “repetitions”, could be useful also that a developer could “embed” directly from code, which fragment should be nested in a specific html node, in a similar way of old “widget embed” in which once was possible to embed a “navigaton-bar” in a specific code point of an Header fragment.

In this way, if I have a Button fragments with many configurations, I could manage by code that in a Card fragment in a specific html node is nested this fragment allowing all Button variations, avoiding to “duplicate and replicate” all configurations for buttons also into the Card one.

With this addition, development will be very modular and optimized.

3 Answers

3

Thanks for sharing your idea @ldetomi, generally we tend to be conservative about this as this can affect performance, so we want to cover the use cases that can bring clear value without impacting the performance of the page. Please, feel free to share the exact scenarios you need so we can take a look at them and analyze case by case.

There is an almost identical topic for another user with specific considerations that maybe could answer to your last question.

Thanks for the idea. Restricting fragments in specific drop-zones makes sense functionally, and we do something similar in Master Pages. However, deep nesting can lead to performance issues and technical complexity on the backend. For now, we need to carefully analyze the technical feasibility and performance implications before putting it into our roadmap. We will keep this in mind for future improvements.