Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi there!

I want my client to be able to upload multiple images in a blog post, so I'm using repeatable reagions. But, I can't seem to figure out how to only display one image on the blog list page.

This is my code for the blog list page:

Code: Select all
<cms:pages masterpage='blog.php' paginate='1' limit='5'>
   <article class="blog">
      <h2 class="u--align-center"><cms:show k_page_title /></h2>
      <div class="date u--align-center"><cms:date k_page_date format='F d, Y' /></div>
      <div class="text">
         <cms:excerptHTML count='50'>
            <cms:show blog_content />
         </cms:excerptHTML>
      </div>

      <img class="blog-img" src="<cms:show my_image" alt="<cms:show k_page_title />">

      <!-- Pagination, etc. -->
   </article>
</cms:pages>


Please help :)
Hi,

I think the following should help -
https://www.couchcms.com/forum/viewtopi ... 708#p12561
http://couchdocs/concepts/repeatable-re ... the-values
Code: Select all
<cms:show_repeatable 'my_multiple_images' startcount='1' >
    <cms:if k_count eq '1' >
    <b>Image: <img src="<cms:show my_image />" /> <br/>
    <b>Desc:</b> <cms:show my_desc />
    <hr>
    </cms:if>
</cms:show_repeatable>
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Great! Thanks for the help @KK & @trendoman, it worked! :D
4 posts Page 1 of 1