Wiki源代码Home
显示最后作者
author | version | line-number | content |
---|---|---|---|
1 | == {{displayIcon name="bell"/}} 通知公告 == | ||
2 | |||
3 | |||
4 | (% style="font-size:16px" %)内部网站,不提供注册功能。 | ||
5 | |||
6 | |||
7 | == == | ||
8 | |||
9 | == == | ||
10 | |||
11 | == == | ||
12 | |||
13 | (% class="col-xs-12 col-sm-6" %) | ||
14 | ((( | ||
15 | === 近期更新 === | ||
16 | |||
17 | {{velocity}} | ||
18 | ## 定义顶级页面列表 | ||
19 | #set($topLevelPages = ["Knowledge", "AI For Service", "Automatic"]) | ||
20 | |||
21 | #foreach($topPage in $topLevelPages) | ||
22 | ==== $topPage ==== | ||
23 | |||
24 | ## 查询每个顶级页面下的子页面 | ||
25 | #set($hqlQuery = "select doc.fullName from XWikiDocument doc where doc.space = :spaceName and doc.name != 'WebPreferences' order by doc.date desc") | ||
26 | #set($query = $services.query.hql($hqlQuery)) | ||
27 | #set($query = $query.bindValue("spaceName", $topPage)) | ||
28 | #set($query = $query.setLimit(3)) | ||
29 | #set($recentDocs = $query.execute()) | ||
30 | |||
31 | ## 输出调试信息 | ||
32 | 查询语句: $hqlQuery | ||
33 | 绑定值: $topPage | ||
34 | 找到 $recentDocs.size() 个子页面。 | ||
35 | |||
36 | ## 遍历子页面 | ||
37 | #foreach($docFullName in $recentDocs) | ||
38 | #set($document = $xwiki.getDocument($docFullName)) | ||
39 | #if($document) | ||
40 | * [[${document.getDisplayTitle()}>>${document.getExternalURL('view')}]] | ||
41 | #else | ||
42 | 文档未找到: $docFullName | ||
43 | #end | ||
44 | #end | ||
45 | |||
46 | ## 如果没有找到子页面 | ||
47 | #if($recentDocs.size() == 0) | ||
48 | 没有找到更新的页面或没有权限查看这些页面。 | ||
49 | #end | ||
50 | |||
51 | #end | ||
52 | {{/velocity}} | ||
53 | |||
54 | |||
55 | |||
56 | ))) |