#set( $selectedindex = 1)
#foreach($hit in $hits.getPageOfHits())
#set( $count = $hits.getPage()+-1 )
#set( $count = $count*$hits.getHitsPerPage() )
#set( $count = ${foreach.count} + $count )
$context.putPageValue("hitindex",$count )
#if($asset.id == $hit.id )
#set($selectedindex = $count)
#end
#set ($sourcepath = $hit.sourcepath)
#set( $type = $mediaarchive.getMediaRenderType($hit.fileformat))
$context.putPageValue("type", $type)
#if ($type=="audio")
#set( $alwaysmime = true)
$context.putPageValue("alwaysmime", $alwaysmime)
#end
$context.putPageValue("clink", $clink)
#set( $editlink = $content.get("asseteditlink") )
#set( $click = "$home$editlink?assetid=$hit.id&categoryid=$catid&hitssessionid=$rootid" )
#set($hitcaption = "")
#if ($hit.name)
#set($hitcaption = $context.getText($hit.name))
#elseif($hit.assettitle)
#set($hitcaption = $context.getText($hit.assettitle))
#end
#end