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
Change comment: There is no comment for this version
To version 35.1
edited by Normann P. Nielsen
on 2026/11/18 18:48
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -7,21 +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 -{{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 -/}}
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}}
24 24  
67 +)))
68 +{{/container}}
25 25  
26 26  )))
27 27