Smarty - add html tag in foreach list
<p>I have an encrypted script and I cannot modify the PHP files, just the HTML template files and I am trying to modify some pages.</p>

<p>What I want to do is to populate a list with some categories but after a certain number of categories I want to add an HTML tag. I have this option in admin panel but for videos not for categories. For videos i have this code:</p>

<pre><code>            {foreach from=$array_recently_added_videos item=video name=videos}
&lt;div class="video"&gt;
html code here..
&lt;/div&gt;

        {if ($smarty.foreach.videos.index+1)%$aSettings.videos_cols==0}&lt;br class="clear"&gt;{/if}
        {foreachelse}
          &lt;center&gt;&lt;br&gt;&lt;b&gt;No videos where found.&lt;/b&gt;&lt;br&gt;&lt;/center&gt;
        {/foreach}
</code></pre>

<p>So if i set in admin panel, 5 columns of videos. After 5 videos it ads this piece of html code</p>

<pre><code>&lt;br class="clear"&gt;
</code></pre>

<p>I want to do the same with the categories. And here im lost. Here is the code i have.</p>

<pre><code>{foreach from=$array_groups[$group_id] item=categ name=categs}

                                  &lt;input type='checkbox' name='{$categ.category_id}' value='{$categ.category_id}'  id='{$categ.category_id}' &gt;&lt;label for='{$categ.category_id}' &gt;{$categ.category_name}&lt;/label&gt;&lt;br&gt;

        {if ($smarty.foreach.categs.index+1)%$aSettings.videos_cols==0}&lt;/td&gt;&lt;td valign='top' align='left'&gt;{/if}               

{/foreach}  
</code></pre>

<p>It adds this piece of HTML code <code>&lt;/td&gt;&lt;td valign='top' align='left'&gt;</code> after 5 categories but I want to add a custom number for categories not the number set for videos. I do not know with what to change this code <code>%$aSettings.videos_cols==0</code>.</p>
