Changes for page Templates
Last modified by Administrator on 2021/08/11 11:39
Change comment:
Install extension [org.xwiki.contrib:application-help-center/1.4]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 4 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -31,26 +31,45 @@ 31 31 })) 32 32 #end 33 33 34 +#macro (getTemplateExample $inputCard $outputCard) 35 + #set ($templateReference = $services.model.resolveDocument($inputCard.templateReference)) 36 + #if ($xwiki.getDocument($templateReference).isNew()) 37 + #set ($outputCard = { 38 + 'title': $inputCard.title, 39 + 'description': $inputCard.description, 40 + 'documentation': 'http://extensions.xwiki.org/xwiki/bin/view/Extension/Templates+Application/', 41 + 'thumbnail': $inputCard.thumbnail 42 + }) 43 + #else 44 + #set ($outputCard = { 45 + 'title': $inputCard.title, 46 + 'description': $inputCard.description, 47 + 'examples': $inputCard.templateReference, 48 + 'thumbnail': $inputCard.thumbnail 49 + }) 50 + #end 51 +#end 52 + 34 34 #set ($exampleCards = [{ 35 35 'title': 'Article', 36 36 'description': 'Article page', 37 - 'e xamples': 'Help.Templates.Article.WebHome',38 - 'thumbnail': 'Help.Templates. Article.WebHome@article.png'56 + 'templateReference': 'Templates.Article.Template.WebHome', 57 + 'thumbnail': 'Help.Templates.WebHome@article.png' 39 39 }, { 40 40 'title': 'Encyclopedia', 41 41 'description': 'Encyclopedia page', 42 - 'e xamples': 'Help.Templates.Encyclopedia.WebHome',43 - 'thumbnail': 'Help.Templates. Encyclopedia.WebHome@encyclopedia.png'61 + 'templateReference': 'Templates.Encyclopedia.Template.WebHome', 62 + 'thumbnail': 'Help.Templates.WebHome@encyclopedia.png' 44 44 }, { 45 45 'title': 'Meeting Report', 46 46 'description': 'Agenda and notes', 47 - 'e xamples': 'Help.Templates.Meeting.WebHome',48 - 'thumbnail': 'Help.Templates. Meeting.WebHome@meeting.png'66 + 'templateReference': 'Templates.Meeting.Template.WebHome', 67 + 'thumbnail': 'Help.Templates.WebHome@meeting.png' 49 49 }, { 50 50 'title': 'Simple Page', 51 51 'description': 'With table of contents', 52 - 'e xamples': 'Help.Templates.Simple.WebHome',53 - 'thumbnail': 'Help.Templates. Simple.WebHome@simple.png'71 + 'templateReference': 'Templates.SimplePage.Template.WebHome', 72 + 'thumbnail': 'Help.Templates.WebHome@simple.png' 54 54 }]) 55 55 {{/velocity}} 56 56 ... ... @@ -82,7 +82,9 @@ 82 82 <div class="clearfix visible-lg-block"></div> 83 83 #end 84 84 <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"> 85 - #helpExampleCard($card) 104 + #set ($outputCard = {}) 105 + #getTemplateExample($card $outputCard) 106 + #helpExampleCard($outputCard) 86 86 </div> 87 87 #end 88 88 </div>
- article.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ssams - Size
-
... ... @@ -1,0 +1,1 @@ 1 +376.1 KB - Content
- encyclopedia.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ssams - Size
-
... ... @@ -1,0 +1,1 @@ 1 +331.5 KB - Content
- meeting.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ssams - Size
-
... ... @@ -1,0 +1,1 @@ 1 +83.5 KB - Content
- simple.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ssams - Size
-
... ... @@ -1,0 +1,1 @@ 1 +180.8 KB - Content