<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Loop Through Files in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/664179#M29458</link>
    <description>&lt;P&gt;I'm working on building a module that will automatically build a marquee showcasing a set of images. I want to make it so that the images are automatically pulled from a folder in the files section of our Kumospace account. The intention is that admins can add or remove images from the folder in order to update the list of images displayed by the module. Is there any way to do this? Other's who have worked on our site have used jquery to get specific images from the files, but I'm having trouble getting all images from an entire folder.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jul 2022 04:07:15 GMT</pubDate>
    <dc:creator>PeterKumospace</dc:creator>
    <dc:date>2022-07-13T04:07:15Z</dc:date>
    <item>
      <title>Loop Through Files</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/664179#M29458</link>
      <description>&lt;P&gt;I'm working on building a module that will automatically build a marquee showcasing a set of images. I want to make it so that the images are automatically pulled from a folder in the files section of our Kumospace account. The intention is that admins can add or remove images from the folder in order to update the list of images displayed by the module. Is there any way to do this? Other's who have worked on our site have used jquery to get specific images from the files, but I'm having trouble getting all images from an entire folder.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 04:07:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/664179#M29458</guid>
      <dc:creator>PeterKumospace</dc:creator>
      <dc:date>2022-07-13T04:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Through Files</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/664199#M29459</link>
      <description>&lt;P&gt;Hi Peter,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, I think you're going to have to loop ALL the files and check the folder name on each file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;– Mike&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 04:47:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/664199#M29459</guid>
      <dc:creator>Mike_Eastwood</dc:creator>
      <dc:date>2022-07-13T04:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Through Files</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/665612#M29525</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/416930"&gt;@PeterKumospace&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;I don't understand much what you are trying to achieve here, but if you have a set of images inside a folder and you want to use them in your modules, you could copy the link to the folder into your module as scr attribute of your images and play with the naming of the images and a loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, you could have the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% for x in range(0,5) %}
	&amp;lt;img src="https://yourdomain.com/path-to-folder/file-{{x}}.jpg"/&amp;gt;
{% endfor %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And your images should have the following names:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;file-0.jpg&lt;/P&gt;
&lt;P&gt;file-1.jpg&lt;/P&gt;
&lt;P&gt;file-2.jpg&lt;/P&gt;
&lt;P&gt;file-3.jpg&lt;/P&gt;
&lt;P&gt;file-4.jpg&lt;/P&gt;
&lt;P&gt;file-5.jpg&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If content editors want to change an image, they just need to replace them inside the folder and keep the same name (and file extension).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this brings some light to your issue&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 21:18:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/665612#M29525</guid>
      <dc:creator>albertsg</dc:creator>
      <dc:date>2022-07-14T21:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Through Files</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/667900#M29609</link>
      <description>&lt;P&gt;Hey, thanks for the suggestion. We have something similar in place in one spot, but we were hoping to manage to make it more dynamic. Looks like that isn't possible at this time though.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 01:47:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/667900#M29609</guid>
      <dc:creator>PeterKumospace</dc:creator>
      <dc:date>2022-07-20T01:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Loop Through Files</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/667901#M29610</link>
      <description>&lt;P&gt;Good to know, thanks Mike!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 01:47:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Loop-Through-Files/m-p/667901#M29610</guid>
      <dc:creator>PeterKumospace</dc:creator>
      <dc:date>2022-07-20T01:47:48Z</dc:date>
    </item>
  </channel>
</rss>

