Changes for page Hjem
Last modified by Normann P. Nielsen on 2026/11/20 07:06
From version 23.1
edited by Normann P. Nielsen
on 2026/11/18 17:58
on 2026/11/18 17:58
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
-
... ... @@ -14,43 +14,27 @@ 14 14 = Nyeste sider = 15 15 16 16 {{velocity}} 17 -#set ($hql = " 18 - select doc.fullName 19 - from XWikiDocument doc 20 - where doc.hidden = false 21 - and doc.fullName not in ( 22 - select obj.name 23 - from BaseObject obj 24 - where obj.className = 'Blog.BlogPostClass' 25 - ) 26 - order by doc.creationDate desc 27 -") 28 - 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") 29 29 #set ($query = $services.query.hql($hql)) 30 30 #set ($discard = $query.setLimit(500)) 31 31 #set ($pages = $query.execute()) 32 32 #set ($count = 0) 33 - 22 +## 34 34 (% class="recent-pages" %) 35 -#foreach ($pageName in $pages) 36 - #if ($count < 10) 37 - #set ($page = $xwiki.getDocument($pageName)) 38 - 39 - ## Check permissions for the current user 40 - #set ($canView = $xwiki.hasAccessLevel( 41 - 'view', $context.user, $pageName 42 - )) 43 - 44 - #if ($canView) 45 - #set ($tags = $services.tag.getTagsForDocument($pageName)) 46 - 47 - #if (!$tags.contains('noshow')) 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))## 48 48 |[[${page.title}>>${page.fullName}]]|$datetool.format('dd-MM-yyyy', $page.creationDate) 49 - #set ($count = $count + 1)50 - #end51 - #end52 - #end53 -#end 33 +#set ($count = $count + 1)## 34 +#end## 35 +#end## 36 +#end## 37 +#end## 54 54 {{/velocity}} 55 55 56 56