in the wiki and here (
http://www.rejetto.com/forum/html-templates/hfs-templates-vars-and-section-help/)
you can find a variable named %item-type%
%item-type% Return the value according the same section name, when item is folder, file or link
<a {.if|{.%item-type% = folder .}|target="_blank".} href="%item-url%"><img src="%item-icon%"> %item-name%</a>
Another way of doing this, is to explode the section [file=folder=link|private] into several pieces
[file=folder=link|private]
<tr class='{.if|{.mod|{.count|row.}|2.}|even.}'><td>
<input type='checkbox' class='selector' name='selection' value="%item-url%" {.if not|{.or|{.get|can delete.}|{.get|can access.}|{.get|can archive item.}.}|disabled='disabled'.} />
{.if|{.get|is new.}|<span class='flag'> NEW </span>.}
{.if not|{.get|can access.}|<img src='/~img_lock'>.}
[+folder]
<a href="%item-url%" target="_blank">
[+file=+link]
<a href="%item-url%">
[+file=+folder=+link]
<img src="%item-icon%"> %item-name%</a>
{.if| {.length|{.?search.}.} |{:{.123 if 2|<div class='item-folder'>{.!item folder.} |{.breadcrumbs|{:<a href="%bread-url%">%bread-name%/</a>:}|from={.count substring|/|%folder%.}/breadcrumbs.}|</div>.}:} .}
{.123 if 2|<div class='comment'>|{.commentNL|%item-comment%.}|</div>.}
[+file]
<td>%item-size%B<td>%item-modified%<td>%item-dl-count%
[+folder]
<td class='nosize'>{.!folder.}<td>%item-modified%<td>%item-dl-count%
[+link]
<td class='nosize'>{.!link.}<td colspan='2'>