#macro ( link $href $name ) #if ( ( $href.toLowerCase().startsWith("http") || $href.toLowerCase().startsWith("https") ) ) $name #else $name #end #end #macro ( banner $banner $id ) #if ( $banner ) #if( $banner.href ) #else
#end #if( $banner.src ) #set ( $src = $banner.src ) #if ( ! ( $src.toLowerCase().startsWith("http") || $src.toLowerCase().startsWith("https") ) ) #set ( $src = $PathTool.calculateLink( $src, $relativePath ) ) #set ( $src = $src.replaceAll( "\\", "/" ) ) #end #if ( $banner.alt ) #set ( $alt = $banner.alt ) #else #set ( $alt = $banner.name ) #end $alt #else $banner.name #end #if( $banner.href ) #else
#end #end #end #macro ( links $links ) #set ( $counter = 0 ) #foreach( $item in $links ) #set ( $counter = $counter + 1 ) #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) ) #link( $currentItemHref $item.name ) #if ( $links.size() > $counter ) | #end #end #end #macro ( breadcrumbs $breadcrumbs ) #set ( $counter = 0 ) #foreach( $item in $breadcrumbs ) #set ( $counter = $counter + 1 ) #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) ) #if ( $currentItemHref == $alignedFileName || $currentItemHref == "" ) $item.name #else #link( $currentItemHref $item.name ) #end #if ( $breadcrumbs.size() > $counter ) > #end #end #end #macro ( displayTree $display $item ) #if ( $item && $item.items && $item.items.size() > 0 ) #foreach( $subitem in $item.items ) #set ( $subitemHref = $PathTool.calculateLink( $subitem.href, $relativePath ) ) #set ( $subitemHref = $subitemHref.replaceAll( "\\", "/" ) ) #if ( $alignedFileName == $subitemHref ) #set ( $display = true ) #end #displayTree( $display $subitem ) #end #end #end #macro ( menuItem $item ) #set ( $collapse = "none" ) #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) ) #if ( $item && $item.items && $item.items.size() > 0 ) #if ( $item.collapse == false ) #set ( $collapse = "expanded" ) #else ## By default collapsed #set ( $collapse = "collapsed" ) #end #set ( $display = false ) #displayTree( $display $item ) #if ( $alignedFileName == $currentItemHref || $display ) #set ( $collapse = "expanded" ) #end #end
  • #if ( $item.img ) #if ( ! ( $item.img.toLowerCase().startsWith("http") || $item.img.toLowerCase().startsWith("https") ) ) #set ( $src = $PathTool.calculateLink( $item.img, $relativePath ) ) #set ( $src = $src.replaceAll( "\\", "/" ) ) #else #end #end #if ( $alignedFileName == $currentItemHref ) $item.name #else #link( $currentItemHref $item.name ) #end #if ( $item && $item.items && $item.items.size() > 0 ) #if ( $collapse == "expanded" ) #end #end
  • #end #macro ( mainMenu $menus ) #foreach( $menu in $menus ) #if ( $menu.name )
    $menu.name
    #end #if ( $menu.items && $menu.items.size() > 0 ) #end #end #end $title
    $bodyContent