Community forum for knowledge and support

Updated 7 months ago

layout 415 cms collection integration

At a glance

The community member is asking if it's possible to add a CMS collection to a Webflow component called "Layout 415", as the elements are visible based on their class and they can't add a class in the CMS that will be added automatically. Another community member suggests using the ::nth-of-type pseudo-class to target the cards and apply custom CSS. The community member thanks them and says they'll need to investigate further, as they are a designer and it may not be easy for them. Another community member mentions looking into Finsweet attributes, which they say might be a relatively easy solution, but the original poster couldn't find what they were looking for in the Finsweet attributes. There is no explicitly marked answer.

Useful resources

Hi guys! ๐Ÿ‘‹ I'm not sure where to put this question, but is it possible to add a CMS collection to this beautiful component Layout 415? ๐Ÿ™‚
The elements are visible based on the class they have so I assume this can be tricky with Webflow (as I can't add a class in the CMS that will be added automatically).

But maybe there's a solution?
Thanks in advance!

N
M
O
7 comments

I would use ::nth-of-type pseudo class
https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-of-type

So basically every card has the same class (sticky-card for example).
Then, you add custom CSS.

sticky-card::nth-of-type(1){
margin-top: 0;
...
}

sticky-card::nth-of-type(2){
margin-top: 20px;
...
}
and so on

Let me know if you managed to do it this way

Iโ€™ll need to investigate - Iโ€™m a designer, so it wonโ€™t be that easy to me ๐Ÿ™‚

Might be worth looking into these Finsweet attributes. One might just be worth it. - But it also might not. I just know itโ€™s relatively easy to implement.
https://finsweet.com/attributes

Thanks - I was thinking about and I saw that Finsweet had something similar in their CMS library scripts - but thatโ€™s not supported anymore (although still might work): https://finsweet.com/cms-library/add-classes

I was looking for something similar in Attributes but couldnโ€™t find it (and Iโ€™ve moved to another task in the meantime ๐Ÿ™‚ )

Add a reply
Sign up and join the conversation on Slack