Skip to main content
Contributor I
October 4, 2024
Solved

Universal content with event variables (for function?)

  • October 4, 2024
  • 4 replies
  • 154 views

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

    This topic has been closed for replies.
    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

    4 replies

    chloe.strange
    Community Manager
    Community Manager
    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

    oboda7Author
    Contributor I
    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
    Community Manager
    November 1, 2024

    Hi @oboda7

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

    ~Chloe

    oboda7Author
    Contributor I
    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