title: How to create a unique name when looping through each new category?
body: <p>I need a way for each new category to have a unique name in a <strong>data attribute</strong>.</p>
  
  <p>Below is how my code runs and displays:</p>
  
  <p>E.g</p>
  
  <hr>
  
  <p><strong>Category one</strong></p>
  
  <p><em>Picture 1 | Picture 2 | Picture 3</em></p>
  
  <p><strong>Category two</strong></p>
  
  <p><em>Picture 1 | Picture 2 | Picture 3 | Picture 4</em></p>
  
  <p><strong>Category three</strong></p>
  
  <p><em>Picture 1 | Picture 2</em></p>
  
  <hr>
  
  <p>What I need to do is when it starts a loop on each new category, every <code>&lt;a&gt;</code> in the <code>ServicePageSVTSliders</code> loop needs to add a <code>1</code> (or something similar) to <code>data-gall="myGallery"&gt;</code>. This way it will create a unique group for that category. And then when my lightbox pops up when the link is clicked it will just cycle through the particular images/iframes for that category instead of cycling through everything.</p>
  
  <p>e.g </p>
  
  <p><strong>Category one</strong></p>
  
  <p><code>data-gall="myGallery"&gt;</code> * 3 for Category one <br/>
  <code>data-gall="myGallery1"&gt;</code> * 4 for Category two <br/>
  <code>data-gall="myGallery2"&gt;</code> * 2 for Category three <br/></p>
  
  <p><strong>My Code:</strong></p>
  
  <pre><code>&lt;% loop SVTCategorys %&gt;
      &lt;div class="svt-service-row"&gt;
          &lt;div&gt;
             &lt;h2 class="svt-service-heading"&gt;$CategoryName&lt;/h2&gt;
          &lt;/div&gt;
          &lt;div&gt;
          &lt;% loop ServicePageSVTSliders %&gt;
            &lt;a class="venobox_custom" 
           data-type="iframe" href="$SVTSliderLink" data-gall="myGallery"&gt;
             ... (Image sits in here)
           &lt;/a&gt;
         &lt;% end_loop %&gt;
  &lt;% end_loop %&gt;
  </code></pre>
  
  <p>Lightbox I am using: <a href="http://lab.veno.it/venobox/" rel="nofollow">http://lab.veno.it/venobox/</a></p>