Unable to contain templates inside a container

Hi i’m creating many templates single card templates yet when adding them to a page they seem to mess up and blow out of the main container.

any ideas what I’m doing wrong.


Hi John,

How should your cards look like? What exactly is the problem?

Best regards,

I have the same issue.

The problem is that when recalling any section template (section or simple card or whatever) with the template element, the top level container of the template is attributed the .root class, wherever it is inserted, with the corresponding CSS:

  • root width
  • root padding
  • self centered

IMHO, when calling a template, .root class SHOULD ONLY be added if template is inserted at root level, like a real section.
It is the actual purpose of the class.
I guess section templates were designed to work with… sections :wink:

Maybe they could be renamed as well, like Reusable or Global, since we should be allowed to save whatever we like?

In the meantime, we have to set width: auto and your custom padding to fix this.

Hi Yan,
you have already reported the issue: WIP: 1.4RC2: Section templates width is broken :wink:

Best regards,

I think it’s a different problem, but closely related :wink:

The one I opened was that template needed to be 100% width to adapt to full width sections (with .root class).

This new one is that for NON sections templates, the .root class should not be added at all (no section width, no padding transfer to inner…).

Maybe @thomas can tell if it’s a real bug or a section template limitation, as section template may only be used for sections for now. But it would be very handy to transform this into generic reusable templates (for instance post thumbnails/cards that could be recalled in different repeaters, or forms that could be used in different single templates, etc.).

Same problem in the builder: editing a simple container template adds .root anyway.

Hi Yan,
There are now at least three or 4 container threads (you probably know better than me), all somehow related and differing in nuance… which makes it relatively difficult to reconcile everything.

By then, at the latest, all container problems will take care of themselves and you’re in full control.

If you have a suggestion that solves the whole root “problem” in all conceivable situations (of which there are many), we are completely open to it and would appreciate that a lot.

1 Like