#macro ( link $href $name $target ) #if ( $href.toLowerCase().startsWith("http:/") || $href.toLowerCase().startsWith("https:/") || $href.toLowerCase().startsWith("ftp:/") || $href.toLowerCase().startsWith("mailto:") || $href.toLowerCase().startsWith("file:/") || ($href.toLowerCase().indexOf("://") != -1) ) $name #else $name #end #end ## #macro ( linkWithImage $href $name $img $align ) #if ( $href.toLowerCase().startsWith("http:/") || $href.toLowerCase().startsWith("https:/") || $href.toLowerCase().startsWith("ftp:/") || $href.toLowerCase().startsWith("mailto:") || $href.toLowerCase().startsWith("file:/") || ($href.toLowerCase().indexOf("://") != -1) ) #if ( $align == "left" ) $img $name #else $name $img #end #else #if ( $align == "left" ) $img $name #else $name $img #end #end #end ## #macro ( banner $banner $id ) #if ( $banner ) #if( $banner.href ) #set ( $hrf = $banner.href ) #if ( ! ( $hrf.toLowerCase().startsWith("http:/") || $hrf.toLowerCase().startsWith("https:/") || $hrf.toLowerCase().startsWith("ftp:/") || $hrf.toLowerCase().startsWith("mailto:") || $hrf.toLowerCase().startsWith("file:/") || ($hrf.toLowerCase().indexOf("://") != -1) ) ) #set ( $hrf = $PathTool.calculateLink( $hrf, $relativePath ) ) #set ( $hrf = $hrf.replaceAll( '\\', '/' ) ) #if ( ( $hrf == '' ) ) #set ( $hrf = './' ) #end #end #else #end ## #if( $banner.src ) #set ( $src = $banner.src ) #if ( ! ( $src.toLowerCase().startsWith("http:/") || $src.toLowerCase().startsWith("https:/") || $src.toLowerCase().startsWith("ftp:/") || $src.toLowerCase().startsWith("mailto:") || $src.toLowerCase().startsWith("file:/") || ($src.toLowerCase().indexOf("://") != -1) ) ) #set ( $src = $PathTool.calculateLink( $src, $relativePath ) ) #set ( $src = $src.replaceAll( '\\', '/' ) ) #end #if ( $banner.alt ) #set ( $alt = $banner.alt ) #else #set ( $alt = "" ) #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( '\\', '/' ) ) #set ( $target = "" ) #link( $currentItemHref $item.name $target ) #if ( $links.size() > $counter ) | #end #end #end ## #macro ( breadcrumbs $breadcrumbs ) #foreach( $item in $breadcrumbs ) #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) #if ( ( $currentItemHref == '' ) ) #set ( $currentItemHref = './' ) #end ## #set ( $target = "" ) #link( $currentItemHref $item.name $target ) > #end #if ( $shortTitle ) $shortTitle #else $title #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( '\\', '/' ) ) ## ## AV 20150927 START #if ( $item.target ) #set ( $target = ' target="' + $item.target + '"' ) #else #set ( $target = "") #end ## AV 20150927 END ## #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.align ) #set ( $align = $item.align ) #else #set ( $align = "left" ) #end ## #if ( ! ( $item.img.toLowerCase().startsWith("http:/") || $item.img.toLowerCase().startsWith("https:/") || $item.img.toLowerCase().startsWith("ftp:/") || $item.img.toLowerCase().startsWith("mailto:") || $item.img.toLowerCase().startsWith("file:/") || ($item.img.toLowerCase().indexOf("://") != -1) ) ) #set ( $src = $PathTool.calculateLink( $item.img, $relativePath ) ) #set ( $src = $src.replaceAll( '\\', '/' ) ) #set ( $src = ' src="' + $src + '"' ) #else #set ( $src = ' src="' + $item.img + '"' ) #end ## #if( $item.alt ) #set ( $alt = ' alt="' + $item.alt + '"' ) #else #set ( $alt = ' alt="' + $item.name + '"' ) #end ## #if( $item.border ) #set ( $border = ' border="' + $item.border + '"' ) #else #set ( $border = ' border="0"' ) #end ## #if( $item.width ) #set ( $width = ' width="' + $item.width + '"' ) #else #set ( $width = "" ) #end #if( $item.height ) #set ( $height = ' height="' + $item.height + '"' ) #else #set ( $height = "" ) #end ## #set ( $img = '" ) ## #if ( $align == "left" ) #if ( $alignedFileName == $currentItemHref ) $img $item.name #else #linkWithImage( $currentItemHref $item.name $img $align ) #end #else #if ( $alignedFileName == $currentItemHref ) $item.name $img #else #linkWithImage( $currentItemHref $item.name $img $align ) #end #end #else #if ( $alignedFileName == $currentItemHref ) $item.name #else #link( $currentItemHref $item.name $target ) #end #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 ) #if ( $menu.img ) #if( $menu.align ) #set ( $align = $menu.align ) #else #set ( $align = "left" ) #end ## #if ( ! ( $menu.img.toLowerCase().startsWith("http:/") || $menu.img.toLowerCase().startsWith("https:/") || $menu.img.toLowerCase().startsWith("ftp:/") || $menu.img.toLowerCase().startsWith("mailto:") || $menu.img.toLowerCase().startsWith("file:/") || ($menu.img.toLowerCase().indexOf("://") != -1) ) ) #set ( $src = $PathTool.calculateLink( $menu.img, $relativePath ) ) #set ( $src = $src.replaceAll( '\\', '/' ) ) #set ( $src = ' src="' + $src + '"' ) #else #set ( $src = ' src="' + $menu.img + '"' ) #end ## #if( $menu.alt ) #set ( $alt = ' alt="' + $menu.alt + '"' ) #else #set ( $alt = ' alt="' + $menu.name + '"' ) #end ## #if( $menu.border ) #set ( $border = ' border="' + $menu.border + '"' ) #else #set ( $border = ' border="0"' ) #end ## #if( $menu.width ) #set ( $width = ' width="' + $menu.width + '"' ) #else #set ( $width = "" ) #end #if( $menu.height ) #set ( $height = ' height="' + $menu.height + '"' ) #else #set ( $height = "" ) #end ## #set ( $img = '" ) ## #if ( $align == "left" )
    $img $menu.name
    #else
    $menu.name $img
    #end #else
    $menu.name
    #end #end #if ( $menu.items && $menu.items.size() > 0 ) #end #end #end ## #macro ( copyright ) #if ( $project ) #set ( $currentYear = ${currentDate.year} + 1900 ) ## #if ( ${project.inceptionYear} && ( ${project.inceptionYear} != ${currentYear.toString()} ) ) ${project.inceptionYear}-${currentYear} #else ${currentYear} #end ## #if ( ${project.organization} && ${project.organization.name} ) ${project.organization.name} #end #end #end ## #macro ( publishDate $position $decorationPublishDate $version ) #if ( $decorationPublishDate && $decorationPublishDate.format ) #set ( $format = $decorationPublishDate.format ) #else #set ( $format = "yyyy-MM-dd" ) #end ## $dateFormat.applyPattern( $format ) ## #if ( $publishDate ) #set ( $dateValue = $dateFormat.format( $publishDate ) ) #elseif ( $decoration.custom.getChild( 'publishDate' ) ) #set ( $dateValue = $decoration.custom.getChild( 'publishDate' ).getValue() ) #else #set ( $dateValue = $dateFormat.format( $currentDate ) ) #end ## #if ( $decorationPublishDate && $decorationPublishDate.position ) #set ( $datePosition = $decorationPublishDate.position ) #else #set ( $datePosition = "left" ) #end ## #if ( $version ) #if ( $version.position ) #set ( $versionPosition = $version.position ) #else #set ( $versionPosition = "left" ) #end #end ## #set ( $breadcrumbs = $decoration.body.breadcrumbs ) #set ( $links = $decoration.body.links ) ## #if ( $datePosition.equalsIgnoreCase( "right" ) && $links && $links.size() > 0 ) #set ( $prefix = " |" ) #else #set ( $prefix = "" ) #end ## #if ( $datePosition.equalsIgnoreCase( $position ) ) #if ( ( $datePosition.equalsIgnoreCase( "right" ) ) || ( $datePosition.equalsIgnoreCase( "bottom" ) ) ) $prefix $i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateValue #if ( $versionPosition.equalsIgnoreCase( $position ) )  | $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version} #end #elseif ( ( $datePosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $datePosition.equalsIgnoreCase( "navigation-top" ) ) )
    $i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateValue #if ( $versionPosition.equalsIgnoreCase( $position ) )  | $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version} #end
    #elseif ( $datePosition.equalsIgnoreCase("left") )
    $i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateValue #if ( $versionPosition.equalsIgnoreCase( $position ) )  | $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version} #end #if ( $breadcrumbs && $breadcrumbs.size() > 0 ) | #breadcrumbs( $breadcrumbs ) #end
    #end #elseif ( $versionPosition.equalsIgnoreCase( $position ) ) #if ( ( $versionPosition.equalsIgnoreCase( "right" ) ) || ( $versionPosition.equalsIgnoreCase( "bottom" ) ) ) $prefix $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version} #elseif ( ( $versionPosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $versionPosition.equalsIgnoreCase( "navigation-top" ) ) )
    $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
    #elseif ( $versionPosition.equalsIgnoreCase("left") )
    $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version} #if ( $breadcrumbs && $breadcrumbs.size() > 0 ) | #breadcrumbs( $breadcrumbs ) #end
    #end #elseif ( $position.equalsIgnoreCase( "left" ) ) #if ( $breadcrumbs && $breadcrumbs.size() > 0 )
    #breadcrumbs( $breadcrumbs )
    #end #end #end ## #macro ( poweredByLogo $poweredBy ) #if( $poweredBy ) #foreach ($item in $poweredBy) #if( $item.href ) #set ( $href = $PathTool.calculateLink( $item.href, $relativePath ) ) #set ( $href = $href.replaceAll( '\\', '/' ) ) #else #set ( $href="http://maven.apache.org/" ) #end ## #if( $item.name ) #set ( $name = $item.name ) #else #set ( $name = $i18n.getString( "site-renderer", $locale, "template.builtby" ) ) #set ( $name = "${name} Maven" ) #end ## #if( $item.img ) #set ( $img = $item.img ) #else #set ( $img = "images/logos/maven-feather.png" ) #end ## #if ( ! ( $img.toLowerCase().startsWith("http:/") || $img.toLowerCase().startsWith("https:/") || $img.toLowerCase().startsWith("ftp:/") || $img.toLowerCase().startsWith("mailto:") || $img.toLowerCase().startsWith("file:/") || ($img.toLowerCase().indexOf("://") != -1) ) ) #set ( $img = $PathTool.calculateLink( $img, $relativePath ) ) #set ( $img = $img.replaceAll( '\\', '/' ) ) #end ## #if( $item.alt ) #set ( $alt = ' alt="' + $item.alt + '"' ) #else #set ( $alt = ' alt="' + $name + '"' ) #end ## #if( $item.border ) #set ( $border = ' border="' + $item.border + '"' ) #else #set ( $border = "" ) #end ## #if( $item.width ) #set ( $width = ' width="' + $item.width + '"' ) #else #set ( $width = "" ) #end #if( $item.height ) #set ( $height = ' height="' + $item.height + '"' ) #else #set ( $height = "" ) #end ## #end #if( $poweredBy.isEmpty() ) $i18n.getString( #end #else $i18n.getString( #end #end ## #macro ( googleAnalytics $accountId ) #if( $accountId && $accountId != "" ) #end #end ## $title #foreach( $author in $authors ) #end #if ( $dateCreation ) #end #if ( $dateRevision ) #end #if ( $decoration.body.head ) #foreach( $item in $decoration.body.head.getChildren() ) ## Workaround for DOXIA-150 due to a non-desired behaviour in p-u ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toString() ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toUnescapedString() #set ( $documentHeader = '' ) #if ( $item.name == "script" ) $StringUtils.replace( $item.toUnescapedString(), $documentHeader, "" ) #else $StringUtils.replace( $item.toString(), $documentHeader, "" ) #end #end #end #if( $headContent )$headContent#end #googleAnalytics( $decoration.googleAnalyticsAccountId )
    $bodyContent