<div class="topic-liteimage" >
<ul id="swfu_images">
{if $aImages}
{foreach from=$aImages item=oImage}
<li class="image" id="image_{$oImage->getId()}">
<input type="hidden" id="image_url_{$oImage->getId()}" value="{$oImage->getWebPath('original')}|{$oImage->getWebPath('preview')}|{$oImage->getWebPath('slider')}" />
<input type="hidden" id="image_description_{$oImage->getId()}" value="{$oImage->getDescription()}" />
<img src="{$oImage->getWebPath('crop')}" alt="" />
<div class="action-right">
<a href="#" onclick="ls.image.deleteImage({$oImage->getId()});return false;" class="delete" title="{$aLang.plugin.liteimage.li_delete}"></a><br />
<a href="#" onclick="ls.image.showSettings({$oImage->getId()}); return false;" class="settings" title="{$aLang.plugin.liteimage.li_settings}"></a>
</div>
<div class="action-left">
<a href="#" onclick="ls.image.markToText({$oImage->getId()}); return false;" class="paste" title="{$aLang.plugin.liteimage.li_add_image_text}"></a>
<a href="#" onclick="ls.image.markToTextPreview({$oImage->getId()}); return false;" class="paste-link" title="{$aLang.plugin.liteimage.li_add_image_text_preview}"></a><br />
</div>
<div class="action-bottom">
<input type="checkbox" name="liteimg{$oImage->getId()}" id="liteimg{$oImage->getId()}" class="liteimg" value="{$oImage->getId()}" />
</div>
</li>
{/foreach}
{/if}
</ul>
<input type="checkbox" name="auto_inject" id="auto_inject" /> {$aLang.plugin.liteimage.li_auto_inject}
<ul class="action-liteimage">
<li class="action-images"><a href="#" onclick="ls.image.multiMarkToText(); return false;">{$aLang.plugin.liteimage.li_add_checked}</a></li>
<li class="action-images"><a href="#" onclick="ls.image.ShowCreateSlider(); return false;">{$aLang.plugin.liteimage.li_slider_create}</a></li>
<li class="action-images"><a href="#" onclick="ls.image.ShowCreateBlock(); return false;">{$aLang.plugin.liteimage.li_block_create}</a></li>
</ul>
<a href="#" class="info-link" onclick="jQuery('#liteimage-info').toggle('show'); return false;">{$aLang.plugin.liteimage.info_link}</a>
<div id="liteimage-info">
<img src="{$sTWPLi}/images/delete.png" alt="" align="left" /> - {$aLang.plugin.liteimage.info_delete}<br >
<img src="{$sTWPLi}/images/settings.png" alt="" align="left" /> - {$aLang.plugin.liteimage.info_block_settings}<br />
<img src="{$sTWPLi}/images/paste.png" alt="" align="left" /> - {$aLang.plugin.liteimage.info_paste} <br />
<img src="{$sTWPLi}/images/paste_link.png" alt="" align="left" /> - {$aLang.plugin.liteimage.info_paste_link}
</div>
</div>
<div id="create-block" class="create-block">
<h3>{$aLang.plugin.liteimage.li_fotoblock_title}</h3>
<p class="note">{$aLang.plugin.liteimage.li_fotoblock_note}</p>
<div id="box_prewiev">
</div>
<br />
<div style="clear: both; text-align: center">
<a href="#" onclick="ls.image.markBlockToText(); return false;" class="button button-primary">{$aLang.plugin.liteimage.li_fotoblock_add}</a>
<a href="#" onclick="$('#create-block').hide(); return false;" class="button">{$aLang.plugin.liteimage.li_fotoblock_cancel}</a>
</div>
</div>
<div id="create-block-slider" class="create-block-slider">
<h3>{$aLang.plugin.liteimage.li_fotoslider_title}</h3>
<p class="note">{$aLang.plugin.liteimage.li_fotoslider_note}</p>
<div id="box_slider_prewiev">
</div>
<br />
<div style="clear: both; text-align: center">
<a href="#" onclick="ls.image.markSliderToText(); return false;" class="button button-primary">{$aLang.plugin.liteimage.li_fotoslider_add}</a>
<a href="#" onclick="$('#create-block-slider').hide(); return false;" class="button">{$aLang.plugin.liteimage.li_fotoslider_cancel}</a>
</div>
</div>
Вот есть такой шаблончик. В него загружаются фотографии
<li class="image" id="image_129"><input type="hidden" id="image_url_129" value="/02/22/6c45ba5a05_original.jpg><input type="hidden" id="image_description_129" value=""><img src="/uploads/image/2015/02/22/6c45ba5a05_crop.jpg" alt=""><div class="action-right"><a href="#" onclick="ls.image.deleteImage(129);return false;" class="delete" title="удалить"></a><br><a href="#" onclick="ls.image.showSettings(129); return false;" class="settings" title="настройки"></a></div><div class="action-left"><a href="#" onclick="ls.image.markToText(129); return false;" class="paste" title="добавить в текст"></a><a href="#" onclick="ls.image.markToTextPreview(129); return false;" class="paste-link" title="добавить в текст c превью"></a><br></div><div class="action-bottom"><input type="checkbox" name="liteimg129" id="liteimg129" class="liteimg" value="129"></div></li>
Вот голову уже сломал как НЕ показывать <div class="topic-liteimage" > если внутри нет картинок и показывать (без перезагрузки станицы) если они там появились!