{if empty($VALUE)}
	{assign var=filenames value=[]}
{else}
	{assign var=filenames value=":"|explode:$VALUE}
{/if}

{if $CONTEXTPAGE == 'submission_listing'}
{if $filenames|@count < 2}
	{foreach from=$filenames item=filename name=filelist}
		<a href="{$folder_url}/{$filename}" 
			{if $use_fancybox == "yes"}class="fancybox"{/if}>{$filename}</a>{if not $smarty.foreach.filelist.last}, {/if}
	{/foreach}
{else}
	<div class="cf_file_num_files"><b>{$filenames|@count}</b> {$LANG.word_files|lower}</div> 
{/if}
{elseif $CONTEXTPAGE == 'edit_submission'}
	<ul class="cf_file_list_view"> 
		{foreach from=$filenames item=filename}
		<li>
			<a href="{$folder_url}/{$filename}" 
				{if $use_fancybox == "yes"}class="fancybox"{/if}>{$filename}</a>
		</li>
		{/foreach}
	</ul>
{elseif $CONTEXTPAGE == 'export:text'}
{foreach from=$filenames item=filename name=loop}{$folder_url}/{$filename}{if !$smarty.foreach.loop.last},{/if} {/foreach}
{elseif $CONTEXTPAGE == 'export:html'}
{foreach from=$filenames item=filename name=loop}<a href="{$folder_url}/{$filename}" target="_blank">{$filename}</a>{if not $smarty.foreach.loop.last}, {/if}{/foreach}
{else}
{foreach from=$filenames item=filename name=loop}{$filename}{if !$smarty.foreach.loop.last},{/if} {/foreach}
{/if}