## ## ## #template("name.vm") ## Searches for the given velocity template and interprets it. ## Only the velocity parser is executed on the file. ## The template is searched in the following locations, in this order: ## - as a property of the XWikiSkins object attached to the current skin document ## - as an attachment to the current skin document ## - as a file in the directory corresponding to the current skin ## - the above 3 locations corresponding to the base skin ## - the above 3 locations corresponding to the default skin ## - as a file in the /templates/ directory ## #macro(template $tname) $xwiki.parseTemplate($tname) #end ## ## ## #renderTemplate("name.vm") ## Searches for the given velocity template and renders it. ## The template is searched in the following locations, in this order: ## - as a property of the XWikiSkins object attached to the current skin document ## - as an attachment to the current skin document ## - as a file in the directory corresponding to the current skin ## - the above 3 locations corresponding to the base skin ## - the above 3 locations corresponding to the default skin ## - as a file in the /templates/ directory ## #macro(renderTemplate $tname ) $xwiki.renderTemplate($tname) #end ## ## ## #includeTopic("Space.Document") ## Includes another fully rendered document inside the current response. ## The topic is interpreted and rendered exactly as if it were viewed in a separate response, ## meaning that the $doc variable will point to the included document. The resulting string is ## wrapped with {pre}...{/pre}, in order to prevent double-rendering. ## The platform prevents recursive includes. ## This macro is useful for creating composite documents from smaller parts, or the other way around, ## splitting a large document into smaller distinct chunks which can be edited in parallel. ## #macro(includeTopic $topic) $xwiki.includeTopic($topic) #end ## ## ## #includeMacros("Space.Document") ## Includes the content of another document as velocity macros. Because of the way the velocity ## engine works, trying to place macros in another document and including it with another method ## will not have the expected result. Other than making the macros available, it works just as ## #includeForm($topic) ## #macro(includeMacros $topic) $xwiki.includeForm($topic) #end ## ## ## #includeForm("Space.Document") ## Includes another fully rendered document inside the current response. ## The included content is interpreted and rendered in the current context, meaning that $doc will ## point to the current document (the includer), and not the included one. The resulting string is ## wrapped with {pre}...{/pre}, in order to prevent double-rendering. ## The platform prevents recursive includes. ## This macro is the core of the document-template-sheet functionality of XWiki, where a document ## has an XObject attached to it, its content consists of the "#includeForm('Some.Sheet')" statement, ## and the sheet works just as if it were actually inside the document's content. ## #macro(includeForm $topic) $xwiki.includeForm($topic) #end ## ## ## #includeInContext("Some.Document") ## Alias for #includeForm ## #macro(includeInContext $topic) $xwiki.includeForm($topic) #end ## ## ## #includeServlet("/xwiki/bin/view/Some/Document?params") ## Invokes on the server another servlet corresponding to the passed URL, and returns the output. ## This is done using standard servlet mechanisms (javax.servlet.RequestDispatcher#include). ## #macro(includeServlet $url) $xwiki.invokeServletAndReturnAsString($url) #end ## ## ## #versions() ## Displays links to the last 4 versions (including the current one), and to the full history ## page of the current document. ## #macro(versions) #foreach($rev in $tdoc.getRecentRevisions(4)) $rev | #end #if ($tdoc.realLanguage!="") $msg.get("diff") | #else $msg.get("history") | #end #end ## ## ## #errorMarkup() ## Display all queued Struts errors ## #macro(errorMarkup) #if ($errors && $!errors.exist() ) #end #end ## ## ## #errorMarkupForProperty("prop") ## Display all queued Struts errors for a particular property ## #macro(errorMarkupForProperty $property) #if ($errors && $!errors.exist($property) ) #end #end ## ## ## #jabber("jabberId") ## Displays the status for the given Jabber id ## #macro(jabber $id) jabber $id #end ## ## ## #skype("skypeId") ## Displays the status for the given Skype id ## #macro(skype $id) #end ## ## ## #yahoo("yahooId") ## Displays the status for the given Yahoo! id ## #macro(yahoo $id) yahoo $id #end ## ## ## #aim("aimId") ## Displays the status for the given AIM id ## #macro(aim $id) #set($onurl = "${request.scheme}://${request.serverName}${xwiki.getSkinFile('aimonline.gif')}") #set($offurl = "${request.scheme}://${request.serverName}${xwiki.getSkinFile('aimoffline.gif')}") Online detector #end ## ## ## #msn("msnId") ## Displays the status for the given MSN id ## #macro(msn $id) #set($onurl = "${request.serverName}${xwiki.getSkinFile('msnonline.gif')}") #set($offurl = "${request.serverName}${xwiki.getSkinFile('msnoffline.gif')}") #end ## ## ## #im("XWiki.Username") ## Displays the instant messaging account status of the given user. The IM network and the account ## name are taken from the user profile. ## #macro(im $user) #set($userdoc = $xwiki.getDocument($user)) #set($userobj = $userdoc.getObject("XWiki.XWikiUsers")) #set($imtype = $userdoc.display("imtype","view",$userobj)) #set($imaccount = $userdoc.display("imaccount","view",$userobj)) #if($imtype=="Yahoo") #yahoo("$imaccount") #end #if($imtype=="AIM") #aim("$imaccount") #end #if($imtype=="MSN") #msn("$imaccount") #end #if($imtype=="Jabber") #jabber("$imaccount") #end #if($imtype=="Skype") #skype("$imaccount") #end #end ## ## ## #sign("XWiki.Username") ## Displays a "signature", a link to the user's profile page. ## #macro(sign $username) #if($username.indexOf(".")==-1) #set($username = "XWiki.${username}") #end #if($xwiki.exists("$username")) $xwiki.getUserName("$username") #else $xwiki.getUserName("xwiki:${username}") #end #end #macro(includeHelp $pagename) #if($xwiki.exists("xwiki:XWiki.${pagename}")) $xwiki.includeForm("xwiki:XWiki.${pagename}",false) #else #if($xwiki.exists("XWiki.${pagename}")) $xwiki.includeForm("XWiki.${pagename}",false) #end #end #end #macro(flickr $rss) {rss:feed=${rss}|full=1} #end #macro(flickrtag $tag) #flickr("http://www.flickr.com/services/feeds/photos_public.gne?tags=${tag}&format=rss_200") #end #macro(flickruser $id) #flickr("http://www.flickr.com/services/feeds/photos_public.gne?id=${id}&format=rss_200") #end #macro(flickrusertag $id $tag) #flickr("http://www.flickr.com/services/feeds/photos_public.gne?id=${id}&tags=${tag}&format=rss_200") #end #macro(map $address $cp $linktext) ${linktext} #end #macro(mindmap $mindmap $width $height) #if(!$width) #set($width="100%") #end #if(!$height) #set($height="600") #end #if(!$mindmap) #set($mindmap = "") #set($mmurl = "") #else #if($mindmap.startsWith("http")) #set($mmurl = $mindmap) #else #set($mmurl1 = $doc.getAttachmentURL($mindmap,"download")) #set($mmurl = "${request.scheme}://${request.serverName}:${request.serverPort}${mmurl1}") #end #end #end #macro(toc $pinit $pmax $pnumbered) #set($init = $pinit) #set($max = $pmax) #set($numbered = $pnumbered) #set ($int = 0) #set ($boolean = false) #if ($init == "") #set ($init = 2) #else #set ($init = $int.valueOf($init)) #end #if ($max == "") #set ($max = 6) #else #set ($max = $int.valueOf($max)) #end #if ($numbered == "") #set ($numbered = false) #else #set ($numbered = $boolean.valueOf($numbered)) #end #set ($tocData = ${tdoc.getTOC($init, $max, $numbered)}) #set ($context.tocData = $tocData) #set ($lastLevel = $init - 1) #set ($depth = 0) #set ($openeditem = true)
#foreach ($tocEntry in $tocData.entrySet()) #set ($level = $tocEntry.value.level) #if ($level > $lastLevel) #set ($to = $lastLevel + 1) #set ($iter = [$level .. $to]) #foreach ($n in $iter) #if($openeditem) #set($openeditem = false) #else
  • #end
  • #set ($depth = $depth - 1) #end #else #end
  • $!tocEntry.value.numbering $xwiki.parseContent($tocEntry.value.text) #set ($lastLevel = $level) #set($openeditem = true) #end #if ($depth > 0) #set ($levels = [1 .. $depth]) #foreach($level in $levels)
  • #end #end
    #end #macro(exportPackage) #set($export = $request.get("export")) #if ($export == "1") #set($dateFormat = "dd MMM yyyy ? HH:mm") #set($diff = $request.get("diff")) #set($SpaceName = $request.get("SpaceName")) 1.1 $msg.get("wikiweb") : $SpaceName
    #set($docs = $xwiki.getSpaceDocsName($SpaceName)) #foreach ($doc in $docs) #if ($xwiki.hasAccessLevel("view", "${context.database}:${SpaceName}.${doc}")) #end #end
    $msg.get("name")$msg.get("export")$msg.get("defaultaction")
    $msg.get("overwrite")$msg.get("mergeobjects")$msg.get("skip")
    [${doc}>${SpaceName}.${doc}]
    #if($SpaceName != "XWiki") 1.1 $msg.get("wikiweb") : XWiki #set($docs = $xwiki.getSpaceDocsName("XWiki")) #foreach ($doc in $docs) #if ($xwiki.hasAccessLevel("view", "${context.database}:XWiki.${doc}")) #end #end
    $msg.get("name")$msg.get("export")$msg.get("defaultaction")
    $msg.get("overwrite")$msg.get("mergeobjects")$msg.get("skip")
    [${doc}>XWiki.${doc}]
    #end
    #elseif ($export == "2") #set($ToExport = $request.getParameterValues("ToExport")) $response.setContentType("application/zip") #set($export = $xwiki.export) #foreach ($itemexp in $ToExport) #set($defaultAction = $request.get("${itemexp}_default")) $export.add($itemexp, $defaultAction) #end $export.export() #else
    Select the space you want to export :
    #set($spaces = $xwiki.getSpaces())
    #end #end #macro(importPackage) #set($toexport = $request.get("export")) #if($toexport == "1") #set($appName = $request.get("App")) #set($alist = $doc.getAttachmentList()) #foreach ($oAttach in $alist) #if ($oAttach.getFilename() == $appName) #set($import = $xwiki.import) $import.importPackage($oAttach.getContent()) #set($docs = $import.getDocuments()) #foreach($docInfo in $docs) #set($right = "") #set($right = $request.get("$docInfo.getFullName()_default")) #if($right) $import.setDocumentAction($docInfo.getFullName(), $right) #end #end #set($ret = $import.install()) $import.getTestInstallToString($ret) #end #end #else #set($alist = $doc.getAttachmentList()) #if ($alist.size() == 0) Add the package in attachment #end #foreach ($oAttach in $alist) #set($import = $xwiki.import) 1.1 $oAttach.getFilename() $import.importPackage($oAttach.getContent()) 1.1.1 $msg.get("info") $msg.get("author") : $import.getAuthor()
    $msg.get("name") : $import.getName()
    $msg.get("description") : $import.getDescription()
    $msg.get("licence") : $import.getLicence()
    $msg.get("version") : $import.getVersion()
    #set($canInstall = $import.testInstall()) install : $import.getTestInstallToString($canInstall) 1.1.1 $msg.get("statusofeachfile") #set($docs = $import.getDocuments())
    #foreach($docInfo in $docs) #if($import.getTestInstallToString($docInfo.isInstallable()) == "Already exist") #if ($import.getActionToString($docInfo.getDefaultAction()) == "overwrite") #else #end #if ($import.getActionToString($docInfo.getDefaultAction()) == "merge") #else #end #if ($import.getActionToString($docInfo.getDefaultAction()) == "skip") #else #end #else #end #end
    $msg.get("name")$msg.get("info")$msg.get("action")
    $msg.get("overwrite")$msg.get("mergeobjects")$msg.get("skip")
    [$docInfo.getFullName()>$docInfo.getFullName()] __$import.getTestInstallToString($docInfo.isInstallable())__
    #if ($canInstall != 0) 1.1.1 $msg.get("caninstallapplication") #else 1.1.1 $msg.get("cannotinstallapplication") #end
    #end #end #end ### ### Separator ### ### Insert a span containing a | ### #macro(sep) | #end ### ### useravatar ### ### Display the avatar of a user, or a standard image if the user has no avatar ### ### @param username The name of the user whose avatar will be displayed ### #macro(useravatar $username) #if(!$picturelist) #set($picturelist = $util.hashMap) #end #if(!$picturelist.containsKey($username)) #set($picture = "$username")) #set($profiledoc = $xwiki.getDocument($username)) #if(!$profiledoc.isNew()) #set($profileobj = $profiledoc.getObject("XWikiUsers", 0)) #if($profiledoc.attachmentList.size() != 0) #set($hasavatar = 0) #if($profileobj.avatar && $profileobj.avatar != "") #foreach ($attach in $profiledoc.attachmentList) #if($attach.filename == $profileobj.avatar) #set($hasavatar = 1) #end #end #end #if($hasavatar == 1) #set($pictureurl = $profiledoc.getAttachmentURL($profileobj.avatar)) #set($picture = ""))
          #set($picture = $picture.concat($username))
          #set($picture = $picture.concat("")) #end #end #end $!picturelist.put($username, $picture) #end $picturelist.get($username) #end ### ### mimetypeimg ### ### Display an icon according to the mimetype ### ### @param mime The reported mimetype of the file ### @param fname The name of the file ### #macro(mimetypeimg $mime $fname) #set($idx = $fname.lastIndexOf(".")) #set($idx = $idx + 1) #if(($idx != 0) && ($idx != -1)) #set($ext = $fname.substring($idx)) #else #set($ext = "") #end ##### images #if($mime.equals("image/svg"))SVG #elseif($mime.equals("application/svg+xml"))SVG #elseif($mime.startsWith("image/"))$msg.get('image') ##### text based #elseif($mime.equals("text/plain"))$msg.get('text') #elseif($mime.equals("text/html"))HTML #elseif($mime.equals("text/css"))CSS #elseif($mime.startsWith("text/"))$msg.get('text') ##### documents #elseif($mime.equals("application/xml"))XML #elseif($mime.equals("application/pdf"))PDF #elseif($mime.equals("application/postscript"))PS #elseif($mime.equals("application/msword"))Word #elseif($mime.equals("application/powerpoint"))PPT #elseif($mime.equals("application/x-shockwave-flash"))SWF ##### archives #elseif($mime.equals("application/x-tar"))TAR #elseif($mime.equals("application/zip"))ZIP #elseif($mime.equals("application/x-gzip"))GZ #elseif($mime.equals("application/java-archive"))JAR ##### media #elseif($mime.startsWith("audio/"))$msg.get('audio') #elseif($mime.startsWith("video/"))$msg.get('video') ##### octet-streams extensions #elseif($mime.equals("application/octet-stream")) #if($ext.equals("xls"))XLS #elseif($ext.equals("bz") || $ext.equals("bz2") || $ext.equals("tbz"))BZ #elseif($ext.equals("tgz"))GZ #elseif($ext.equals("rar"))RAR #elseif($ext.equals("odp") || $ext.equals("odt") || $ext.equals("odf") || $ext.equals("sxw") || $ext.equals("stw"))OpenOffice #elseBIN #end #elseif($mime.startsWith("application/"))$msg.get('application') #end #end ### ### packName ### ### Display a shorter version of a string ### ### @param name The processed string ### #macro(packName $name) #if(!$maxnamelength) #set($maxnamelength = 25) #end #set($idx = $name.lastIndexOf(".")) #if(($idx != 0) && ($idx != -1)) #set($ext = $name.substring($idx)) #else #set($ext = "") #set($idx = $name.length()) #end #set($fname = $name.substring(0, $idx)) #if($fname.length() > $maxnamelength)$fname.substring(0, $maxnamelength)~$ext#else$name#end #end #macro(xwikiobjectfield $fielddoc $fieldname $fieldtext $action)
    $fieldtext
    #if($fieldname!="") $fielddoc.display($fieldname, $action) #end
    #end #macro(formfield $fieldtext $html)
    $fieldtext
    $html
    #end #macro(defaultDisplayObj $document $obj) #set($class = $obj.xWikiClass) #foreach($prop in $class.properties) #formfield(${prop.prettyName} $document.display($prop.getName(), "edit", $obj)) #end #end #macro(defaultViewDisplayObj $document $obj) #set($class = $obj.xWikiClass) #foreach($prop in $class.properties) #formfield(${prop.prettyName} $document.display($prop.getName(), "view", $obj)) #end #end ## ## Formats a date according to the ISO8601 standard ## #macro(formatdateISO $date) #set($tz = $xwiki.formatDate($date, "Z")) #set($tz = "${tz.substring(0, 3)}:${tz.substring(3)}") $xwiki.formatDate($date, "yyyy-MM-dd")T$xwiki.formatDate($date, "HH:mm:ss")$tz#end ## ## Formats a username like a fn (hCard microformat) ## #macro(userfn $username) #set($fn = $xwiki.getLocalUserName($username)) #if($fn.indexOf("= 0) #set($fn = $fn.replaceAll("_-]', '')) #set($footnote_id = $page_footnotes.size()) \[$footnote_id\]#end ## ## ## #macro(putFootnotes) #if($page_footnotes && ($page_footnotes.size() > 0))
      #foreach($footnote in $page_footnotes)
    1. ^ $footnote
    2. #end
    #set($discard = $page_footnotes.clear()) #set($footnote_group_id = $footnote_group_id + 1) #end #end ## ## ## Generate navigation links for paged documents ## Deprecated, replaced by #printPagedViewLinks ## #macro(pagedViewLinks $itemsPerPage $totalPages $crtPageNumber) #if($totalPages > 0)
    #if($crtPageNumber > 0) #set($prevPage = $crtPageNumber - 1) $msg.get("web.paging.firstPage") $msg.get("web.paging.previousPage") #else $msg.get("web.paging.firstPage") $msg.get("web.paging.previousPage") #end #set($displayCrtPageNumber = $crtPageNumber + 1) #set($displayTotalPages = $totalPages + 1) $msg.get("web.paging.pageNumberOf", [$displayCrtPageNumber, $displayTotalPages]) #if($crtPageNumber < $totalPages) #set($nextPage = $crtPageNumber + 1) $msg.get("web.paging.nextPage") $msg.get("web.paging.lastPage") #else $msg.get("web.paging.nextPage") $msg.get("web.paging.lastPage") #end
    #end #end ## ## ## Generate navigation links for paged documents. It will use the URL parameters "ipp" to forward ## the number of items per page, and "page" to indicate a certain page. The actual range (in items, ## not in pages) can be computer using #preparePagedViewParams. The macro does not print anything ## if only one page exists and $alwaysDisplay is not set to true. Does not alter any variables. ## ## @param itemsPerPage The number of items per page, will be forwarded in the links to other pages. ## @param totalPages The total number of pages, starting at 1. ## @param currentPageNumber The currently displayed page, starting at 1. ## @param additionalQueryParams Query string fragmentthat should be put in the links. Should not ## start or end with ? or & ## @param alwaysDisplay Force display of the links, even if there is only one page in total. ## #macro(printPagedViewLinks $itemsPerPage $totalPages $currentPageNumber $additionalQueryParams $alwaysDisplay) ## Only display if there are more than 1 pages or we explicitely require it. #if(($totalPages > 1) || $alwaysDisplay)
    #if($currentPageNumber > 1) #set($currentPageNumber = $currentPageNumber - 1) $msg.get("web.paging.firstPage") $msg.get("web.paging.previousPage") #set($currentPageNumber = $currentPageNumber + 1) #else $msg.get("web.paging.firstPage") $msg.get("web.paging.previousPage") #end $msg.get("web.paging.pageNumberOf", [$currentPageNumber, $totalPages]) #if($currentPageNumber < $totalPages) #set($currentPageNumber = $currentPageNumber + 1) $msg.get("web.paging.nextPage") $msg.get("web.paging.lastPage") #set($currentPageNumber = $currentPageNumber - 1) #else $msg.get("web.paging.nextPage") $msg.get("web.paging.lastPage") #end
    #end #end ## ## ## Used together with #printPagedViewLinks, computes the range of items to show and the ## variables used by #printPagedViewLinks, $currentPageNumber, $itemsPerPage, $totalPages. ## ## @param totalItems The total number of items that need to be displayed. ## @param defaultItemsPerPage The default number of items per page, if no override is found in the ## URL. If 0, then display all items. ## @sets startAt The first item to display (inclusive). ## @sets endAt The last item to display (exclusive). ## @sets itemsPerPage The requested number of items per page. ## @sets totalPages The total number of pages according to the requested number of items per page ## and total items. Starts at 1. ## @sets currentPageNumber The current page displayed. If the requested page is not available (out ## of range), then it will be corrected to a valid number. Starts at 1. ## #macro(preparePagedViewParams $totalItems $defaultItemsPerPage) ## Reuse existing variable, in case it is manually overriden somewhere else #if(!$itemsPerPage) #if($request.ipp) #set($itemsPerPage = $util.parseInt($request.ipp)) #else #set($itemsPerPage = $defaultItemsPerPage) #end #end ## Page numbers start at 1 outside this macro, but for internal computations we use 0-indexed values. #set($currentPageNumber = $util.parseInt($request.page) - 1) ## The first item to show. Must be >= 0. #set($startAt = $itemsPerPage * $currentPageNumber) #if($startAt < 0) #set($startAt = 0) #end ## The last item to show (exclusive). Must be <= total number of items. #set($endAt = $itemsPerPage * ($currentPageNumber + 1)) #if(($endAt > $totalItems) || ($itemsPerPage == 0)) #set($endAt = $totalItems) #end ## Never show the items after the last one... They don't exist! #if($startAt >= $endAt) #set($startAt = $endAt - 1) #end ## Compute the total number of pages. #if($itemsPerPage == 0) #set($totalPages = 1) #else #set($totalPages = ($totalItems - 1) / $itemsPerPage + 1) #end ## The requested page might not be available, so correct it to correspond to the displayed items. #set($currentPageNumber = $startAt / $itemsPerPage + 1) #end ## ## ## Macro to set a page break used in print, pdf and rtf mode ## #macro(pagebreak)

    #end ## ## ## Macro to include childs of a page ## #set($clevel = 1) #macro(includeChilds $page) #includeChilds($page false) #end ## Macro to include childs at multiple levels #macro(includeChilds $page $withPageBreaks) #if($clevel!=0) #foreach($childDocName in $xwiki.searchDocuments("where doc.parent='$page' order by doc.creationDate")) #set($childDoc = $xwiki.getDocument($childDocName)) #if(($childDoc)&&($childDoc.getSpace()!="Panels")&&($childDoc.getSpace()!="XWiki")) #if($withPageBreaks) #pagebreak() #end $childDoc.getRenderedContent() #set($clevel = $xwiki.add($clevel,-1)) #includeChilds($childDocName $withPageBreaks) #set($clevel = $xwiki.add($clevel,1)) #end #end #end #end ## Macro to include childs of a page #macro(includeLinks $page) #includeLinks($page false) #end ## Macro to include childs at multiple levels #macro(includeLinks $page $withPageBreaks) #if($clevel!=0) #set($pageDoc = $xwiki.getDocument($page)) #foreach($child in $pageDoc.getLinks()) #set($childDocName = $child.getLink()) #set($childDoc = $xwiki.getDocument($childDocName)) #if(($childDoc)&&($childDoc.getSpace()!="Panels")&&($childDoc.getSpace()!="XWiki")) #if($withPageBreaks) #pagebreak() #end $childDoc.getRenderedContent() #set($clevel = $xwiki.add($clevel,-1)) #includeLinks($childDocName $withPageBreaks) #set($clevel = $xwiki.add($clevel,1)) #end #end #end #end ### ### Panel header ### ### Generate the starting html code for a panel ### ### @param title The panel caption title ### #macro(panelheader $title) #set($cookieName = "${context.user}_${panel}") #set($expanded = "expanded") #set($expanded = $xwiki.getUserPreferenceFromCookie($cookieName)) ## Note: We pass the Panel name as an HTML class attribute so that it's possible to style ## the Panels selectively using CSS. #set ($specialClassAttribute = "") #if ($paneldoc && $paneldoc != "") #set ($specialClassAttribute = $util.convertToAlphaNumeric($paneldoc.name)) #end

    $title
    #end #macro(panelhiddenheader $title) ## Note: We pass the Panel name as an HTML class attribute so that it's possible to style ## the Panels selectively using CSS. #set ($specialClassAttribute = "") #if ($paneldoc && $paneldoc != "") #set ($specialClassAttribute = $util.convertToAlphaNumeric($paneldoc.name)) #end
    #end #macro(largepanelheader $title) #set($cookieName = "${context.user}_${panel}") #set($expanded = "expanded") #set($expanded = $xwiki.getUserPreferenceFromCookie($cookieName)) ## Note: We pass the Panel name as an HTML class attribute so that it's possible to style ## the Panels selectively using CSS. #set ($specialClassAttribute = "") #if ($paneldoc && $paneldoc != "") #set ($specialClassAttribute = $util.convertToAlphaNumeric($paneldoc.name)) #end
    $title
    #end ### ### Panel footer ### ### Generate the ending html code for a panel ### #macro(panelfooter)
    #end ### ### Display Panel ### ### Extract and display the panel code from the panel object ### #macro(displaypanel $name) #set ($pobj = "") ## Since Velocity does not do any assignment if the RHS is null we need to reset the paneldoc ## as otherwise the previously set panel will be displayed. getDocument() returns null if the ## user doesn't have the right to view a document. #set ($paneldoc = "") #set ($paneldoc = $xwiki.getDocument($name)) #if ($paneldoc != "") #set ($pobj = $paneldoc.getObject("Panels.PanelClass")) #if (!$pobj) ## discarded #else $!doc.display("content", "view", $pobj) #end #end #end #macro(displayPropName $prop) #if($msg.get("$class.getName()_$prop.name") == "$class.getName()_$prop.name") $prop.prettyName#else $msg.get($prop.name)#end #end ### ### Display Panel content ### ### #macro(displaypanelcontent $doc $obj) $doc.display("content", $obj) #end ### ### Toplevel Menu entry with subitems ### ### Generate a menu entry and start the subitem section ### ### @param actionurl The URL this entry points to ### @param linktext The menu item text ### #macro(xwikitopmenuentrystart $actionurl $linktext $id)
    $linktext
    #end ### ### Message box ### #macro(xwikimessageboxstart $title $message)
    $title

    $message

    #end #macro(xwikimessageboxend)
    #end #macro(xwikimessagebox $title $message $urlyes $urlno $msgyes $msgno) #xwikimessageboxstart($title $message)
    #xwikimessageboxend() #end #macro(xwikimessageboxfield $fielddoc $fieldname $fieldtext $html)
    $fieldtext
    #if($fieldname!="") $fielddoc.display($fieldname, "edit") #end #if($html!="") $html #end
    #end #macro(xwikimessageboxsubmit $submittext)
    #end ### ### message ### #macro(warning $text)
    $msg.get("warning"): $text
    #end #macro(error $text)
    $msg.get("error"): $text
    #end #macro(info $text)
    $text
    #end #macro(message $text)
    $text
    #end #macro (floatingbox $text)
    $text
    #end #macro (startfloatingbox)
    #end #macro (endfloatingbox)
    #end ### ### Display in page panels layout ### ### #macro(displayPanelLayout $nbcolumns $panelNameList)
    #set($lastColumnId = ($nbcolumns - 1)) #foreach($colId in [0..$lastColumnId])
    #foreach($panelName in $panelNameList) #if($panelName && ($panelName != "") && (((($velocityCount - 1) + $nbcolumns) % $nbcolumns) == $colId)) #displaypanel($panelName) #end #end
    #end
    #end