<
From version < 3.1 >
edited by Vincent Massol
on 2021/04/08
To version < 4.1
edited by Vincent Massol
on 2021/04/08
Change comment: Rollback to version 2.1

Summary

Details

Page properties
Content
... ... @@ -24,16 +24,8 @@
24 24   #set ($discard = $rnObject.set('date', ''))
25 25   ## Copy the template content + title
26 26   #set ($templateDoc = $xwiki.getDocument($defaultTemplateReferenceString))
27 - ## Replace the following template variables in the template content and title by the product value.
28 - ## We do that here instead of using Velocity in the template content/title so that the generated RN page renders
29 - ## as fast as possible. We also use a template variavle format different than the velocity syntax so that the
30 - ## template page can use Velocity and any variable it wishes without a risk of clash.
31 - ## - "!!product!!" --> $product
32 - ## - "!!version!!" --> $version
33 - #set ($newContent = $stringtool.replaceEach($templateDoc.content, ['!!product!!', '!!version!!'], [$product, $version]))
34 - #set ($discard = $rnDoc.setContent($newContent))
35 - #set ($newTitle = $stringtool.replaceEach($templateDoc.title, ['!!product!!', '!!version!!'], [$product, $version]))
36 - #set ($discard = $rnDoc.setTitle($newTitle))
27 + #set ($discard = $rnDoc.setContent($templateDoc.content))
28 + #set ($discard = $rnDoc.setTitle($templateDoc.title))
37 37   #set ($discard = $rnDoc.save('New Release note'))
38 38   ## Redirect in edit mode to edit the RN
39 39   $response.sendRedirect($xwiki.getURL($services.model.serialize($rnPageReference)))

Get Connected