Skip to main content
Solved

Universal content with event variables (for function?)

  • October 4, 2024
  • 4 replies
  • 67 views

Forum|alt.badge.img

Hello, 

I’m trying to find out, how to make a universal content “component” (UCC) with variable event.

 

My example: I created UCC for a product tile with many variables (let’s say “product_item.0.url” etc.). I needed to duplicate 9 times (because 0 to 8).

 

What I want to achieve is to have one UCC with a variable that increases the number by one each time a new UCC is inserted.

 

Would anyone be able to help me? Thank you

Best answer by chloe.strange

Hi @oboda7

The recommendation would be to loop over the items. This article will walk you through those steps. 

~Chloe

View original
Did this topic or the replies in the thread help you find an answer to your question?

4 replies

chloe.strange
Community Manager
Forum|alt.badge.img+41
  • Community Manager
  • 426 replies
  • October 19, 2024

Hi @oboda7

To clarify this part of your question:

>What I want to achieve is to have one UCC with a variable that increases the number by one each time a new UCC is inserted.

By "each time a new UCC is inserted" are you referring to inserting into a new email template? And also is your desire that this would be an incrementing integer? For example, you want the integer to be 0 for the Template A, 1 for Template B, 2 for Template C and so forth?

~Chloe


Forum|alt.badge.img
  • Author
  • Contributor I
  • 2 replies
  • October 21, 2024

Hi @chloe.strange,

Yes and No, I mean inserting into a new template, but also into the same template multiple times.

 

f.e. I have 2 templates and I want to insert this UCC 4 times into all templates, so:

  • in template 1, I want UCC 1, 2, 3, 4 (let’s say 0, 1, 2, 3)
  • in template 2, same, UCC 1, 2, 3, 4 (let’s say 0, 1, 2, 3)

chloe.strange
Community Manager
Forum|alt.badge.img+41
  • Community Manager
  • 426 replies
  • Answer
  • November 1, 2024

Hi @oboda7

The recommendation would be to loop over the items. This article will walk you through those steps. 

~Chloe


Forum|alt.badge.img
  • Author
  • Contributor I
  • 2 replies
  • November 18, 2024

Hi ​@chloe.strange, that’s not what I need, but thank you. I need to insert a component independently in different places, just with different data