#** * Website and page information and display. * @author Lance Lavandowska (conversion to Velocimacros) *# #** * Sets content type header for page, must be first line in template. **# #macro( setContentType $ctype ) $pageHelper.setContentType($ctype)## comment here kills trailing whitespace #end #** * Set the META tag for ContentType. We do this in addition to * setting the Response header because the header does not get * cached. So in order to maintain the ContentType we must present * it inside the rendered page itself. **# #macro( showContentType $ctype ) #end #** * Display website title. *# #macro( showWebsiteTitle )$website.Name#end #** * Display website description. *# #macro( showWebsiteDescription )$website.Description#end #** * Include a page and evaluate it as a template. * @param pageName Name of page to be included. *# #macro( includePage $pageName ) #set( $iPageId = false )## This is required for such constructs; see velocity docs and ROL-689 #set( $iPageId = $pageModel.getPageIdByName( $pageName ) ) #if ( !$iPageId ) ## no page found, parse pageName #set( $iPageId = $pageName ) #end #parse( $iPageId ) #end #** * Show name of current page. *# #macro( showPageName )$page.Name#end #** * Show current page's description. *# #macro( showPageDescription )$page.Description#end #** * Show current page's update time. *# #macro( showPageUpdateTime )$page.UpdateTime#end #** * Shows weblog category chooser with support for hierarhical categories. * To style completely with CSS, set $divider to "" (empty string). * @param parentCategory Name of top-level category to display. * @param divider The text to place between each category. *# #macro( showWeblogSubcategoryChooser2 $parentCategory $divider ) #set( $rawUrl = "$ctxPath/page/$userName/$page.link" )