###
### Main "view" template
###
### General wrapper for view actions
###
#if ($services.distribution.jobStatus && $services.distribution.jobStatus.state.name() != 'FINISHED' && $services.distribution.canDisplayDistributionWizard())
  $response.sendRedirect($xwiki.getURL('XWiki.Distribution', 'distribution', "xredirect=$escapetool.url($xwiki.relativeRequestURL)"))
#elseif ($request.getParameter("raw").equals("1"))
  #template("code.vm")
#else
  #template("startpage.vm")
  
  #if("$!viewer" == '')
    #set($viewer = $request.getParameter('viewer'))
  #end
  #if("$!viewer" == '')
    #set($viewer = 'content')
  #end
  
  <div class="main">
  <div id="mainContentArea">
  #template("hierarchy.vm")
  #if($viewer == 'content')
    #template("contentview.vm")
  #else
    #template("${viewer}.vm")
  #end
  <div class="clearfloats"></div>
  </div>## mainContentArea
  #if($viewer == 'content' && $displayDocExtra)
    #template("docextra.vm")
  #end
  </div>## main
  #template("endpage.vm")
#end
