Support

Account

Home Forums Add-ons Flexible Content Field Flexible Content: Multiple Flexible Content Fields in a Flexible Content Field

Solving

Flexible Content: Multiple Flexible Content Fields in a Flexible Content Field

  • Let’s assume the following setup:

    I would like to be able to insert a list of teaser boxes amongst other content element types on a page, like so:

    – Page with flexible content:
    – Text Block
    – Teaser Box
    – Gallery
    – etc.

    The TeaserBox itself is a flexible content field, because it is composed of multiple fields itself: image field, title field, sub title field, etc.

    Now, I have two different types of teaser boxes:
    – TeaserBox1 is for Persons (it contains fields such as Name, LinkedIn URL, e-mail Adress, etc.)
    – TeaserBox2 is for Organisations (it contains fields such as Organisation Name, organisation website, number of employees, etc).

    The challenge would be to be able to add both types to the same Teaser Box container so that they can be ordered through drag andd drop.

    Is this possible, and if not, why not?

  • Nested flexible content fields are possible. Are you having a problem with doing this?

  • You are right – it works out of the box. Initially I had some trouble coming up with a working configuration – This is how I made it work:

    Field Group: Flexible Page Content
      - Layout: example_simple_text_block
        - Field: text_field
      - Block Layout: Portraits
        - Field: flexible_content_field_portraits
          - Row Layout: person
            - Field: firstname
            - Field: lastname
          - Row Layout: organisation
            - Field: org_name
            - Field: org_website

    Works nicely, pretty neat! In the admin interface it shows a box for Portraits and both organisations and persons can be added and ordered.

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

The topic ‘Flexible Content: Multiple Flexible Content Fields in a Flexible Content Field’ is closed to new replies.