Skip to main content

Nested Modules VS Module Groups!

Which one do you use?

Julie Moore

This was helpful in showing how to use both the group module option and the nested elements option. But I don't understand WHY I would use one versus the other. What are the benefits of using the group module vs the benefits of using the nested elements?

Amanda Slack

Julie I also don't understand this?
I also thought that a nested module might put one thing inside the other like putting an image inside of a button for example, but they all still stack so it looks a bit of a pointless feature. I'd love to understand more!

Julie Moore

Amanda Slack Agree. And I've watched several videos and none of them explain the difference/benefit.

Julie Moore

Also when you show the 2 groups layout side by side, the group on the right is not 50%, its smaller. What did you do to make it proportion like that?

Steve Seddon

One difference I have noted is the CSS attributes. For nested modules, when applying CSS (sitekrafter) to a parent module, the nested module inherits (at least some of) the parent module CSS attributes and can't be overwritten. In my case, specifically the text size, the parent is set to heading-2xl, the child module inherits, and assigning another text size, eg. text-s, does not work. However text colour does seem to apply if different than the parent module.

When using a group, each module has it's own CSS attributes so works as expected at least in this scenario. This is far as I have tested.

Julie Moore

Steve Seddon OK, well that's somewhat of a difference at least. Thanks

Chris

Thanks ... but doesn´t answer the original question when to use what ...

Julie Moore

Mak, we need your help here!