Home Forums Add-ons Flexible Content Field Fexible know content


Fexible know content

  • Hi,

    It’s a little complicated question…

    I use flexible content with images blocks and text block and my client wants that if he choose and image block and then a text block, the distances will be different between them that if he choose 2 blocks of images.

    Is there any way to know if the next block of the flexible content will be one or another?

    Thanks and regards,

  • I would use CSS for this. You should read about adjacent sibling selectors.

    If your HTML is this:

    <div class="image-block">
    	<!-- img here -->
    <div class="text-block">
    	text here

    You can target .text-block that is immediately after .image-block with this CSS:

    .image-block + .text-block {
        /* CSS here */

    You could then either collapse top margin or padding in that scenario or add whatever else you need depending on your CSS.

  • Hi @raulbofill

    New to version 5.3.6 is the ability to assign custom titles to flexible content layouts, making it simpler for the user to identify the layouts.

    This can be achieved through the following filter:

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.