Is there a way to add a div that is not apart of the current CMS grid? Check out the picture below. This dropdown is a CMS filled grid and I have a spot that I want to fill(red box) but it is not the same CMS collection. Is this possible? Do i need to make a div that has an absolute position and do it like that? I am wondering if there is a better way.
Hey, Cam! Spent a little bit of time with this trying a few things and it does seem like using absolute position is about the only way to get this done. It seems like youâd also have to always limit the collection to a certain number of items so it always falls in the bottom corner. Iâm not sure how youâd achieve a true âwrapâ where the number of items wouldnât matter.
I threw together a quick example for you to reference. Hereâs a read only link. Hope this helps. Let me know if I can clarify anything or if you end up finding a better solution!
Thanks for confirming this. I appreciate you.
Hey @camputty
You can easily do this with Javascript.
Step 1:
Give all of the CMS items a Class name, letâs call it âcms-custom-grid-itemâ
Step 2:
Give the same Class name to the Div that youâd like to add to the grid.
Step 3:
Create a new grid and style it the way you want⌠give it a Class, letâs call it ânew-custom-gridâ.
Step 4:
Add the code below to your Page Body.
<script>
$(".cms-custom-grid-item").appendTo(".new-custom-grid").show();
</script>
Step 5:
If youâre happy with the results, simply hide âcms-custom-grid-itemâ and the code snippet will show it once it loaded and ready to be shown.
EDIT: Iâve added Screengrabs to demonstrate.
Hope this helps!
~ Rhino
Huge! Thanks for this Rhino.
This is awesome! Thank you for sharing.