Changes for page Hjem
Last modified by Normann P. Nielsen on 2026/11/20 07:06
From version 15.3
edited by Normann P. Nielsen
on 2026/11/17 21:43
on 2026/11/17 21:43
Change comment:
Auto-saved during real-time collaboration
To version 35.1
edited by Normann P. Nielsen
on 2026/11/18 18:48
on 2026/11/18 18:48
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,14 +7,65 @@ 7 7 = = 8 8 9 9 |=((( 10 +{{container layoutStyle="columns"}} 11 +((( 10 10 = Nyeste Blogs = 11 11 12 -{{blogpostlist published="yes" limit="10" paginated="no"/}} 13 -)))|=((( 14 +{{velocity}} 15 +#set ($hql = "select doc.fullName from XWikiDocument doc where doc.hidden = false and exists (select obj.id from BaseObject obj where obj.name = doc.fullName and obj.className = 'Blog.BlogPostClass') order by doc.creationDate desc") 16 +#set ($query = $services.query.hql($hql)) 17 +#set ($discard = $query.setLimit(500)) 18 +#set ($pages = $query.execute()) 19 +#set ($count = 0) 20 +## 21 +(% class="recent-blogs" %) 22 +|=Blog post|=Created 23 +#foreach ($pageName in $pages)## 24 +#if ($count < 10)## 25 +#set ($canView = $xwiki.hasAccessLevel('view', $context.user, $pageName))## 26 +#if ($canView)## 27 +#set ($tags = $services.tag.getTagsForDocument($pageName))## 28 +#if (!$tags.contains('noshow'))## 29 +#set ($page = $xwiki.getDocument($pageName))## 30 +|[[${page.title}>>${page.fullName}]]|$datetool.format('dd-MM-yyyy', $page.creationDate) 31 +#set ($count = $count + 1)## 32 +#end## 33 +#end## 34 +#end## 35 +#end## 36 +{{/velocity}} 37 + 38 +))) 39 + 40 +((( 14 14 = Nyeste sider = 15 15 16 -{{documents count="10" actions="false" columns="doc.name" filters="orderBy=creationDate&order=desc&limit=10"/}} 43 +{{velocity}} 44 +#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") 45 +#set ($query = $services.query.hql($hql)) 46 +#set ($discard = $query.setLimit(500)) 47 +#set ($pages = $query.execute()) 48 +#set ($count = 0) 49 +## 50 +(% class="recent-pages" %) 51 +|=Page|=Created 52 +#foreach ($pageName in $pages)## 53 +#if ($count < 10)## 54 +#set ($canView = $xwiki.hasAccessLevel('view', $context.user, $pageName))## 55 +#if ($canView)## 56 +#set ($tags = $services.tag.getTagsForDocument($pageName))## 57 +#if (!$tags.contains('noshow'))## 58 +#set ($page = $xwiki.getDocument($pageName))## 59 +|[[${page.title}>>${page.fullName}]]|$datetool.format('dd-MM-yyyy', $page.creationDate) 60 +#set ($count = $count + 1)## 61 +#end## 62 +#end## 63 +#end## 64 +#end## 65 +{{/velocity}} 17 17 67 +))) 68 +{{/container}} 18 18 19 19 ))) 20 20