Skip to main content
Skip table of contents

3.3 Adding a Component Collection

Adding a Component Collection

👥 User Journey

User Journey – Adding a Component Collection

3.3 Excerpts: User Journey Setups

📋 Setup

Select a Task

Select Components from the side menu

In the title bar, click the expander arrow button to expand filter options

📘 Steps

1️⃣ Click the pencil icon on the Component to add a Collection to

2️⃣ Type HTML, including the Collection syntax, into the Component Editor

3️⃣ Click Configure variables

4️⃣ View – and optionally edit – the Variables that have been created for the Collection

5️⃣ Click the Return to editor button

6️⃣ Click Save

7️⃣ Click Close

:note: Notes

Note the fruits and fruits.item Variables have been created for the Collection based on the value of the ctx-foreach attribute and the declared Variable within the Collection

(warning) Warnings

Deleting a Variable deletes its Content Items, which can result in data loss if the Task is completed.

Be careful not to accidentally delete Variables in the following ways:

  • By changing a Variable’s name or type

  • By cutting and pasting a Variable in the Component Editor

    • Work around this by using copy and paste instead

💻 Examples

The example code in the video is shown below:

HTML
<ul ctx-foreach="fruit in Fruits">
  <li>@fruit</li>
</ul>

3.3 Excerpts: User Journey References

🔖 References

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.