Changes for page Release Notes Application
Last modified by Vincent Massol on 2024/03/25 00:11
Change comment:
There is no comment for this version
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -67,9 +67,47 @@ 67 67 68 68 {{image reference="config.png"/}} 69 69 70 -== Creating a template ==70 +== Creating a Template == 71 71 72 72 When creating a release notes template, two velocity bindings are available to the template content: 73 73 * ##product##: the name of the product 74 74 * ##version##: the short version 75 75 76 +== Creating a Displayer == 77 + 78 +It's possible to add new Displayers. To add one, create a page at ##ReleaseNotes.Code.ChangesDisplayer<id>## where ##<id>## is the id of your new displayer. For example the Grid Displayer use the id ##Grid## and is available at ##ReleaseNotes.Code.ChangesDisplayerGrid##. 79 + 80 +Inside your displayer page you can: 81 +* Include the ##ReleaseNotes.Code.DisplayerMacros## page which has a few velocity Macros and some variables to help you 82 +* Access Velocity bindings: 83 +** ##changeItems##: list of references to change pages to display 84 +** All ##~{~{changes}}## macro parameter values: ##audience##, ##products##, ##versions##, ##categories##, ##importance##, ##containsScreenshots##, ##displayEditLink## 85 + 86 +Example (code for the Simple Displayer): 87 + 88 +{{code}} 89 +{{include reference="ReleaseNotes.Code.DisplayerMacros"/}} 90 + 91 +{{velocity}} 92 +## Inputs: 93 +## - $changeItems 94 +## - $displayEditLink 95 +## - $isUserOrAdmin 96 +#foreach ($item in $changeItems) 97 + #set ($changesDoc = $xwiki.getDocument($item)) 98 + #generateDisplayEditLink($changesDoc) 99 + === $changesDoc.getValue('title')${displayEditLinkMarkup}=== 100 + $changesDoc.getValue('summary') 101 + 102 + #if ($isUserOrAdmin) 103 + #displayScreenshot($changesDoc, false) 104 + #end 105 + 106 + #set ($description = $changesDoc.getValue('description')) 107 + #if ("$!description" != '') 108 + [[More details>>doc:$changesDoc.documentReference]] 109 + #end 110 +#end 111 +{{/velocity}} 112 +{{code}} 113 +