Metsbox Dynamic List

Is it possible to achieve a dynamic list (ul > li) with Bricks/Metabox?

Scenario: I have a CPT called ‘Products.’ Each product will have 3-5 benefits that I would like to display in a list. I’ve set up the Product (single post) template and gotten all of the fields populating correctly, but I can’t achieve the desired outcome for lists.

I’ve tried various custom field types. The ‘text list’ custom field type, but it outputs like so:

Benefit 1
Benefit 2
Benefit 3
.

The WYSIWYG editor works but can’t be styled (no way to add custom CSS classes).

I’ve tried using a query loop with a field group, but that separates each list item into separate container divs.

For more context, here are some similar posts:

2 Likes

I have the same problem, there seems no solution available yet.
On Bricks Academy it is not really described how it works, to have a repeatable/cloneable field inside a cpt-loop with Metabox.

Who can help to solve this issue and give exact instruction on how to define the “loop inside the loop” for the repeatable/cloneable field?

here is the setup of custom fields in Metabox:

This is how the DOM looks currently:

This is how the output looks like:
2024-09-14_09.14h_45-cleanshot@2x

I was not able to define a loop inside the loop for the “service feature” field, that it loops through the DIV (List item with Icon and Text)

How must the loop for the cloneable/repeatable field be defined,
that it loops through and displays all values through DOM?

Thanx in advance for your help for Metabox Specialists.

Solved the problem with repeatable fields inside a cpt-loop with Metabox:

You have to create a GROUP field (extension needed) first for the repeatable field.
And make this group cloneable.
Then inside the group you define the field that needs to be displayed in Bricks.
Because only groups can be choosen as Type/Source in a Bricks CPT loop (with Metabox)
Then it works :slight_smile:

Here are the relevant screenshots (to use it for yourself)

CPT Custom Fields setup for Group and Subfields (inside group):

CPT Group field edit screen with values:

This is how the DOM looks like:

Sub-Loop setup with Group-Field setting:

dynamic Data Field (Group subfield) inside Bricks:

This is how the result looks on FrontEnd:
2024-09-14_10.14h_56-cleanshot@2x

########################

I found a youtube video that made it click in my head (maybe yours, too)

1 Like