Archived topic
Setting left/right layout for archives with dynamic elements
5 replies · Started by Antoinette on July 11, 2021
Hello. I feel like this is going to be a very obvious answer (and I've tried looking in the documentation) but I cannot for the life of me figure out how to use the dynamic elements to display as a left/right layout when building archives using the dynamic element blocks. Is it set by having a parent with two children?
Hi Antoinette,
Not sure I understand your question well, is there any example site or mockup you can show us?
Let me know :)
Sure thing. I'm using a custom post type (using Pods, archive enabled and I get the archive showing up perfectly fine) but looking for something like this with the archive images alternate (this is from generate blocks templates)
Hi Antoinette,
This should be possible with custom CSS.
If you can add a alternating-layout class to the grid block containing the columns, we can do some sort of alternating layout by adding this CSS:
.alternating-layout {
flex-direction: row;
}
.alternating-layout:nth-child(2n) {
flex-direction: row-reverse;
}
That simple, huh? What a joy :-) [though I haven't tested it yet]
I don't suppose using a different number of columns for specific archive layouts is also as simple as a bit of CSS? Have an inkling that might be a bit more of a php job?
This sounds like a custom CSS job.