#* * Use this macro at the top of all of your layout decorations so as * to provide required context objects. *# #macro (defineLayoutObjects) #set($preferedLocale = $JS2RequestContext.locale) #set($rootFragment = $jetspeed.currentFragment) #set($site = $request.getAttribute("org.apache.jetspeed.portalsite.PortalSiteRequestContext")) #set($theme = $request.getAttribute("org.apache.jetspeed.theme")) #set($layoutDecoration = $theme.getDecoration($rootFragment)) #end #* Adds javascript for PortletSelector on HTML *# #macro (includeJavaScriptForHead) #end #* * Returns the full URL for the base of this site. This * can and should be used in the the * of your decoration. *# #macro(BaseHref)${request.scheme}://${request.serverName}:${request.serverPort}${request.contextPath}/#end #* * Returns the correct Content-type string for use within the Content-type * meta tag. *# #macro (ContentType)text/html#if($response.characterEncoding); charset=$response.characterEncoding#end#end #* * Returns the page title string for the current page * *# #macro (PageTitle)$jetspeed.page.getTitle($preferedLocale)#end #* * Returns the site description string for use within the * meta tag *# #macro (PageDescription)$jetspeed.page.getTitle($preferedLocale)#end #* * Returns the site version string for use within the * meta tag *# #macro (SiteVersionTag)$$Id$$ #end #** * Includes all of the stylesheets for this Page's theme. *# #macro (IncludeStylesheets) #foreach($style in $theme.styleSheets) #end #end #* Adds additional style sheets and java script from portlet *# #macro (includeHeaderResource) #set($resourceHeaderFactory = $jetspeed.getComponent("org.apache.jetspeed.headerresource.HeaderResourceFactory")) #set($resourceHeader = $resourceHeaderFactory.getHeaderResouce($JS2RequestContext)) $resourceHeader #end #* * Returns the base CSS class to use in top level tags *# #macro (BaseCSSClass $_decoration)${_decoration.baseCSSClass}#end #macro (PageBaseCSSClass)#BaseCSSClass($layoutDecoration)#end #** * Returns the fully-qualified path the specified resources using * $decorator *# #macro (GetResource $_decorator $_path)$!{_decorator.getResource($_path)}#end #** * Returns the fully-qualified path the specified resources using * the $layoutDecorator that is defined by calling the #defineLayoutObjects() * macro. *# #macro (GetPageResource $_path)#GetResource($layoutDecoration $_path) #end #* Dispalys the standard action bar for this page. *# #macro (PageActionBar) #set($_actions = $layoutDecoration.actions) #if($_actions.size() >0)
#foreach ($_action in $_actions) ${_action.Alt} #end #if($editing == true) #set ($chooser = "${jetspeed.basePath}/system/customizer/portlet-selector.psml") #end
#end #end #macro(PortletActionBar $_decoration) #set($_actions = $_decoration.actions)
#foreach ($_action in $_actions) ${_action.Alt} #end
#end #macro(PagesMenu) #set($_pages = $site.getMenu("pages").elements) #end #macro(NavigationsMenu) #set($_navigations= $site.getMenu("navigations").elements) #set($_seperatorCount = 0) #end #set($_seperatorCount = $_seperatorCount + 1) #end #end #macro (Breadcrumbs) #set($_breadcrumbs = $site.getMenu("breadcrumbs").elements) #end