Changes for page Hjem

Last modified by Normann P. Nielsen on 2026/11/20 07:06

From version 15.1
edited by Normann P. Nielsen
on 2026/11/17 21:39
Change comment: There is no comment for this version
To version 27.1
edited by Normann P. Nielsen
on 2026/11/18 18:05
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -13,7 +13,48 @@
13 13  )))|=(((
14 14  = Nyeste sider =
15 15  
16 -{{blogpostlist published="yes" limit="10" paginated="no"/}}
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 +
29 +#set ($query = $services.query.hql($hql))
30 +#set ($discard = $query.setLimit(500))
31 +#set ($pages = $query.execute())
32 +#set ($count = 0)
33 +
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'))
48 +[[${page.title}>>${page.fullName}]]|$datetool.format('dd-MM-yyyy', $page.creationDate)
49 + #set ($count = $count + 1)
50 + #end
51 + #end
52 + #end
53 +#end
54 +{{/velocity}}
55 +
56 +
57 +
17 17  )))
18 18  
19 19  = Besøg også disse interesseområder =