Changes for page Hjem
Last modified by Normann P. Nielsen on 2026/11/20 07:06
From version 17.1
edited by Normann P. Nielsen
on 2026/11/17 21:45
on 2026/11/17 21:45
Change comment:
There is no comment for this version
To version 32.1
edited by Normann P. Nielsen
on 2026/11/18 18:09
on 2026/11/18 18:09
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -13,15 +13,31 @@ 13 13 )))|=((( 14 14 = Nyeste sider = 15 15 16 -{{liveData 17 - id="recentPages" 18 - source="liveTable" 19 - sourceParameters="translationPrefix=platform.index." 20 - properties="doc.title,doc.location,doc.creationDate" 21 - sort="doc.creationDate:desc" 22 - limit="10" 23 -/}} 16 +{{velocity}} 17 +#set ($hql = "select doc.fullName from XWikiDocument doc where doc.hidden = false and doc.fullName not in (select obj.name from BaseObject obj where obj.className = 'Blog.BlogPostClass') order by doc.creationDate desc") 18 +#set ($query = $services.query.hql($hql)) 19 +#set ($discard = $query.setLimit(500)) 20 +#set ($pages = $query.execute()) 21 +#set ($count = 0) 22 +## 23 +(% class="recent-pages" %) 24 +|=Page|=Created 25 +#foreach ($pageName in $pages)## 26 +#if ($count < 10)## 27 +#set ($canView = $xwiki.hasAccessLevel('view', $context.user, $pageName))## 28 +#if ($canView)## 29 +#set ($tags = $services.tag.getTagsForDocument($pageName))## 30 +#if (!$tags.contains('noshow'))## 31 +#set ($page = $xwiki.getDocument($pageName))## 32 +|[[${page.title}>>${page.fullName}]]|$datetool.format('dd-MM-yyyy', $page.creationDate) 33 +#set ($count = $count + 1)## 34 +#end## 35 +#end## 36 +#end## 37 +#end## 38 +{{/velocity}} 24 24 40 + 25 25 26 26 ))) 27 27