Dynamic BlockList Label

If you want to add a bit more user friendliness to your Blocklist here is a handy bit of code :

{{ imageCards.contentData.length == 1 ? imageCards.contentData.length + ' Image Copy card' : imageCards.contentData.length + 'Image Copy cards' }}

In this example, it counts how many imageCards I have on a blocklist and shows a different label depending on the number. imageCards is the alias on the element block :

I can add as many "image cards" to this property as I like.

This is how it displays

Last updated

Was this helpful?