System Information
- Strapi Version: 4.1.12
- Operating System: Windows 11 (WSL Fedora)
- Database: Default
- Node Version: v16 or v17.4.0
- NPM Version: 8.4.0
- Yarn Version: n.a.
Hey all,
Is there a way to use two or more fields of a component together as the display title for said component? Currently it’s easy enough to set one field as the display title by choosing it from the drop down when on the ‘configuring the view’ page. But what I’m after is having the display title be ‘field1’ + space + ‘field2’… Essentially to concatenate them, like you can do in template strings. eg ${field1} and ${field2}
.
My specific situation is that I’m listing associated products as a repeatable component. Each product has a name and capacity, but neither one on its own clearly identifies the product.
eg
SB4 200kg
SB4 500kg
SB5 200kg
SB5 500kg
Displaying the name field only would show:
SB4
SB4
SB5
SB5
Displaying the capacity field only would show:
200kg
500kg
200kg
500kg
It would be great if i could find where in the code this display title is controlled, and tell Strapi to concatenate the title from more than one field.
Anyone have any ideas/suggestions?
Cheers,
Alex