Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How do I concatenate strings with HUBL?
Highlighted
Occasional Contributor
a week ago - last edited a week ago
How can I concatenate strings with Hubl? The docs suggest there is a special operator for it (~), however I have tried to use it in many different ways and I can't preduce the behaviour I expect.
I need to loop through an list and build up a string with the contents of the list. I have tried this and after the loop the 'items' variable has no value...
{% set items = "" %}
{% for row in hubdb_table_rows(1034058, "orderBy=random()") %}
{{ items = items ~ ("Test"+loop.index0+", ") }}
{% endfor %}
<div>{{ items }}</div>
Has anyone managed to do this before?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content