Изменения документа OrderTemplate
Редактировал(а) Manoeuvring with Difficulty 2024/01/25 10:18
От версии 6.2
отредактировано Manoeuvring with Difficulty
на 2024/01/25 09:46
на 2024/01/25 09:46
Изменить комментарий:
Added tag [test]
К версии 7.1
отредактировано Manoeuvring with Difficulty
на 2024/01/25 10:17
на 2024/01/25 10:17
Изменить комментарий:
made script for displaying similarly tagged pages work
Сводка
-
Свойства страницы (2 изменено, 0 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Теги
-
... ... @@ -1,1 +1,1 @@ 1 -ordertemplate|test 1 +ordertemplate|test|order - Содержимое
-
... ... @@ -36,29 +36,21 @@ 36 36 37 37 = Related = 38 38 39 ----- 40 - 41 -(% style="text-align:center" %) 42 -**Combat** 43 -{{velocity}}#set ($references = $services.query.xwql("from doc.object(XWiki.TagClass) as tag where 'combat' member of tag.tags").execute()) 44 -#foreach($reference in $references) 45 - #set ($document = $xwiki.getDocument($reference)) 46 - #set ($label = $document.getTitle()) 47 - [[$label>>$reference]] | ## 48 -#end{{/velocity}} 49 - 50 ----- 51 - 52 -(% style="text-align:center" %) 53 -**Queued Orders** 54 -{{velocity}}#set ($references = $services.query.xwql("from doc.object(XWiki.TagClass) as tag where 'order' member of tag.tags").execute()) 55 -#foreach($reference in $references) 56 - #set ($document = $xwiki.getDocument($reference)) 57 - #set ($label = $document.getTitle()) 58 - [[$label>>$reference]] | ## 59 -#end{{/velocity}} 60 - 61 - 62 62 {{velocity}} 63 -#set ($tags = $services.query.xwql("select distinct doc.object(XWiki.TagClass).tags from Document doc").execute()) 40 +## Related pages display by Manoeuvring with Difficulty, displays a horizontal list of related pages based upon the tags given to the page 41 +## Get all tags assigned to this page 42 +#set ($tags = $doc.getTagList()) 43 +#foreach($tag in $tags) 44 + ---- 45 + (% style="text-align:center" %) 46 + **$tag.substring(0,1).toUpperCase()$tag.substring(1,$tag.length())** 47 + ~| ## Display the tags with the 1st letter being uppercase 48 + #set ($references = $services.query.xwql("from doc.object(XWiki.TagClass) as tag where '$tag' member of tag.tags").execute()) 49 + #foreach($reference in $references) 50 + #set ($document = $xwiki.getDocument($reference)) 51 + #set ($label = $document.getTitle()) 52 + [[$label>>$reference]] | ## link to every page with the same tag 53 + #end 54 + 55 +#end 64 64 {{/velocity}}