Skip to content

Instantly share code, notes, and snippets.

@crichey
Created October 11, 2010 20:41
Show Gist options
  • Save crichey/621180 to your computer and use it in GitHub Desktop.
Save crichey/621180 to your computer and use it in GitHub Desktop.
declare function app:sidebar()
as element(div)?
{
let $view := $config:CONTEXT/*:view
return
if ($view = ("help","contact","terms"))
then ()
else
<div class="sidebar" arcsize="5 5 0 0">
<div class="sidebar-background" arcsize="5 0 0 5" border="rgb(222,222,222)" id="sidebar_background">&nbsp;</div>
<div class="sidebar-shadow">
<div>&nbsp;</div></div>
{ if ($view eq "detail")
then xdmp:apply($config:remove-facet)
else if ($view = ("search","intro"))
then (xdmp:apply($config:facets),
<div class="category">
<h4 title="Topic">Topic</h4>
</div>)
else ()}
</div>
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment