What can I do to the code to make it work to allow caching?
The mod code looks like this:
Code:
{* ==================== Sub categories mod start *}
{section name=cat_num loop=$subcategories}
{ if %cat_num.first% }
{if $tmp} [img]{if $current_category.icon_url}{$current_category.icon_url}{else}../icon.php?categoryid={$cat}{/if}[/img] {/if}
<table width="75%" border="0" align="center" cellpadding="5" cellspacing="0">
{/if}
{ if %cat_num.index% is div by 3}
<tr>
{/if}
<td align="center" valign="top">
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
[img]../icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]
<font class="ItemsList">{ $subcategories[cat_num].category|escape }</font>
{if $config.Appearance.count_products eq "Y"}
? ?{if $subcategories[cat_num].product_count}
? ?({ $subcategories[cat_num].product_count } Products)
? ?{elseif $subcategories[cat_num].subcategory_count}
({ $subcategories[cat_num].subcategory_count } Subcategories)</a>
? ?{/if}
{/if}
</td>
{ if %cat_num.last% }
</tr>
</table>
{/if}
{/section}
{* ==================== Sub categories mod end *}
So they are calling the subcat icons with this line:
[img]../icon.php categoryid={$subcategories[cat_num].categoryid}[/img]
And I want the browser to cache the image so I guess I need the code to be written to the page as a true url to the image.
How can I do that?
Do have to make a new tpl file for the sub cat icons that functions like the product_thumbnail.tpl file? Is that what generates the true urls for the thumbnails? How would I implement that?