### figure out if attachments was selected
#set($uri = $context.getRequest().getRequestURI())
#set($isattachments = false)
#if($uri == "/$applicationid/views/modules/asset/editor/attachments/index.html")
#set($isattachments = true)
#end
#set( $moduleid = $context.findValue("module") )
#set( $hitssessionid = $context.findValue("hitssessionid") )
#macro (displaydetails $filename $label $assetid $view $print)
$context.putPageValue("view", $view)
#if ($print && $print == "true")
$pages.include("$apphome/components/detaileditor/$filename?assetid=$assetid&view=$view&print=true&pluginpath=$apphome/components/detaileditor/$filename&module=$moduleid", $context)
#else
$pages.include("$apphome/components/detaileditor/toggle.html?pluginpath=$apphome/components/detaileditor/$filename&assetid=$assetid&label=$label&view=$view&module=$moduleid",$context)
#end
#end
##TODO: remove this, use a path action to load em up
#set($hitssessionid = $context.findValue("hitssessionid"))
#if($hitssessionid)
#set($hits = $context.getSessionValue($hitssessionid))
#if( $hits )$context.putPageValue("hits",$hits) #end
#end
#if( $asset )
##$pages.include("$apphome/components/detaileditor/navigate.html", $context)
#set( $assettab = $context.findValue("assettab") )
$pages.include("$apphome/components/detaileditor/assetmenuul.html?moduleid=$moduleid",$context)
#set( $inpreviewpage = $content.isPropertyTrue("showpreviewpage") )
#if( $content.assetrootfolder && $content.path.startsWith($content.assetrootfolder) )
#set( $inpreviewpage = true )
#elseif( $content.assetrootfolder && $content.path.startsWith($content.assetrootfolder) )
#set( $inpreviewpage = true )
#end
#if( $inpreviewpage )
$pages.include("$apphome/views/modules/$moduleid/editor/viewer/index.html", $context)
#else
#set( $showviewer = $content.isPropertyTrue("showviewer") )
#if( $showviewer )
$pages.include("$apphome/views/modules/$moduleid/editor/viewer/index.html", $context)
#else
#end
#set( $listid = $content.tab )
#if ($content.subtab)
#set( $screens = $searcherManager.query($catalogid, $listid).all().sort("name").search() )
#foreach($screen in $screens)
-
$context.getText($screen)
#end
#end
$pages.includeContent()
#end
#if( $canviewassets || $order )
#if( $hits && $hits.hasMultipleSelections() )
$pages.include("$apphome/components/results/related/byselection.html",$context)
#else
$pages.include("$apphome/components/results/related/bykeyword.html",$context)
#end
#end
#else