#set($tabCounter = 0) #set($disabletoc = $root.SelectSingleNode("properties/notoc")) #macro(buildtoc $allSections) #if($allSections.Count >= 2)

Table of contents

#end #end #macro(panels $panelsNode) #set($tabCounter = $tabCounter + 1) #set($tabGroupName = "tabcontent$tabCounter") #set($panelsCount = $panelsNode.SelectNodes("panel/@title").Count)
 
#foreach($panel in $panelsNode.SelectNodes("panel"))
#recursecontent($panel 0)
#end
#end #macro(warningbox $contentNode)
Warning
$contentNode.InnerXml
#end #macro(notebox $contentNode)
Quick Note
$contentNode.InnerXml
#end #macro(downloadbox $contentNode) #set($src = $contentNode.GetAttribute("src")) #set($filename = $contentNode.GetAttribute("filename")) #set($filesize = $contentNode.GetAttribute("filesize")) #set($relative = $contentNode.GetAttribute("relative"))
$filename ($helper.FileSizeInKBytes($basefolder, $relative)k) #if($filesize != "")($filesize)
#end
#end #macro(getrelativelevel) #foreach($it in [1..$folder.Level]) #if($velocityCount == 1)./#else../#end #end #end ### ### Macro metaauthor(author, email) ### #macro(metaauthor $author $email) #end ## ## Macro recursiveSiteMap(node path) ## #macro(recursiveSiteMap $node $path $offset) #set($levelstr = $node.GetAttribute("level")) #set($level = $converter.ToInt($levelstr) - $offset) #set($page = $node.GetAttribute("page")) #if($node.HasAttribute("path")) #set($nodepath = $node.GetAttribute("path")) #else #if($node.ParentNode.HasAttribute("path")) #set($nodepath = $node.ParentNode.GetAttribute("path")) #else #set($nodepath = $node.ParentNode.ParentNode.GetAttribute("path")) #end #end #if($node.GetAttribute("issubpage") == "true")
  • $node.GetAttribute("title") #if($node.ChildNodes.Count > 0) #end
  • #elseif($node.Name == "section") #if($node.HasAttribute("id"))
  • $node.GetAttribute("title") #if($node.ChildNodes.Count > 0) #end
  • #end #else
  • $node.GetAttribute("title") #if($node.ChildNodes.Count > 0) #end
  • #end #end ## ## Macro buildsitemap(sitemapElement) ## #macro(buildsitemap $elem) #set($path = $elem.GetAttribute("select")) #set($selNode = $sitemap.SelectSingleNode($path)) #set($offset = $helper.GetLevels($path)) #set($newpath = $folder.path)
    #end ## ## Macro recursecontent(childNodes level) ## #macro(recursecontent $nodes $level) #foreach($elem in $nodes) #if($elem.NodeType == "Comment") #elseif($elem.Name == "title") $elem.InnerXml #elseif($elem.Name == "sitemap") #buildsitemap($elem) #elseif($elem.Name == "panels") #panels($elem) #elseif($elem.Name == "warning") #warningbox($elem) #elseif($elem.Name == "note") #notebox($elem) #elseif($elem.Name == "download") #downloadbox($elem) #elseif($elem.Name == "pre") #set($format = $elem.GetAttribute("format")) #if($format == "")
    $elem.InnerXml
    #else #if($format == "cs") $cs.FormatCode( $elem.InnerText ) #elseif($format == "html") $html.FormatCode( $elem.InnerText ) #elseif($format == "js") $js.FormatCode( $elem.InnerText ) #elseif($format == "tsql") $tsql.FormatCode( $elem.InnerText ) #elseif($format == "vb") $vb.FormatCode( $elem.InnerText ) #end #end #else #if($elem.Name == "section") #set($level = $level + 1) #if($elem.GetAttribute("id") != "") #end #elseif($elem.NodeType != "Text") #if($elem.HasAttributes) <$elem.Name #foreach($attr in $elem.Attributes)${attr.Name}="${attr.Value}" #end>#else <$elem.Name>#end #end #if($elem.ChildNodes.Count > 0)#recursecontent($elem $level)#else$elem.InnerText#end #if($elem.Name == "section")#set($level = $level - 1)#elseif($elem.NodeType != "Text")#end #end #end #end ## ## Macro createGroup(group) ## #macro(createGroup $group) #set($groupType = $group.GetAttribute("type")) #set($menus = $group.selectNodes("menu"))
    #foreach($menu in $menus) #set($title = $menu.get_Item("title")) #if($title.HasAttribute("abspath")) $title.InnerXml #else $title.InnerXml #end #if($menus.size() > 1)
    #end #end

    #end ## #macro(createMenu) #set($groups = $navigation.SelectNodes("project/body/group")) #foreach($group in $groups) #createGroup($group) #end #end ## #macro(document) $root.get_Item("properties").get_Item("title").FirstChild.Value :: $project.SelectSingleNode("title").FirstChild.Value

    Home

    Castle Stronghold

    #set($custom = $root.SelectSingleNode("body/custom")) #if($custom) #recursecontent($custom 0) #else
    #set($localimg = $navigation.SelectSingleNode("project/localimage")) #if($localimg) #end #set($allSections = $root.SelectSingleNode("body").SelectNodes("section")) #if(!$disabletoc) #buildtoc($allSections) #end

    $root.SelectSingleNode("properties").SelectSingleNode("title").FirstChild.Value

    #set($bcount = $breadcrumbs.Count) #if($bcount > 1) #end #set($introElem = $root.SelectSingleNode("body").SelectSingleNode("intro")) #if($introElem) #set($nodes = $introElem.ChildNodes) #recursecontent($nodes 0) #end ## new call to transform the sections #recursecontent($allSections 0)
    Google
    Search WWW Search castleproject.org
     
    #end #end #document()