Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
I'm building a hotel website. I want to display a person image representing each room's capacity. Owner will set room capacity in admin as a single integer. I then want to use that integer to display multiple person images up to the capacity. How can I achieve this please?

I tried this but it doesn't work:

Code: Select all
<cms:repeat count='<cms:show room_one_capacity />' startcount='1' >
<i class="fas fa-user"></i></cms:repeat>
While setting the 'count' parameter, either use double-quotes as follows -
Code: Select all
<cms:repeat count="<cms:show room_one_capacity />" startcount='1' >
..

Or simply use the variable name as follows -
Code: Select all
<cms:repeat count=room_one_capacity startcount='1' >
..

Please see https://docs.couchcms.com/concepts/sett ... eters.html if you are unsure about what those changes are doing.

Hope this helps.
Perfect. Thank you!
3 posts Page 1 of 1