文档更改Home

Yang Sheng 于 2025-02-42,18:57 最后修改

从版本 112.1
Yang Sheng编辑
在2025-02-42,00:24上
修改评论: 该版本没有评论
到版本
Yang Sheng编辑
在2025-02-42,01:40上
修改评论: 该版本没有评论

摘要

细节

页面属性
内容
... ... @@ -10,8 +10,6 @@
10 10  
11 11  == ==
12 12  
13 -
14 -
15 15  (% class="col-xs-12 col-sm-6" %)
16 16  (((
17 17  === 近期更新 ===
... ... @@ -25,7 +25,10 @@
25 25  
26 26  ## 输出结果
27 27  #foreach($topPage in $topLevelPages)
28 - = $topPage =
26 + ## 初始化标志和输出变量
27 + #set($hasUpdates = false)
28 + #set($output = "")
29 +
29 29   ## 查询每个一级链接下所有子页面的最近更新
30 30   #set($hqlQuery = "select doc.fullName from XWikiDocument doc where doc.fullName like :spacePattern and doc.fullName not like '%:WebPreferences' and doc.fullName not like '%:WebHome' and doc.fullName not like '%:WebSearch' and doc.fullName not like '%:WebRss' and doc.fullName not like '%:WebStatistics' order by doc.date desc")
31 31   #set($query = $services.query.hql($hqlQuery))
... ... @@ -33,7 +33,6 @@
33 33   #set($query = $query.setLimit(3))
34 34   #set($recentDocs = $query.execute())
35 35  
36 - #set($hasUpdates = false)
37 37   #foreach($docFullName in $recentDocs)
38 38   #set($document = $xwiki.getDocument($docFullName))
39 39   #if($document)
... ... @@ -45,7 +45,8 @@
45 45   #if($docTitle == '')
46 46   #set($docTitle = "Untitled Document")
47 47   #end
48 - * [[${docTitle}>>${document.getExternalURL('view')}]]
48 + ## 添加到输出
49 + #set($output = "$output[[${docTitle}>>${document.getExternalURL('view')}]]\n")
49 49   #set($hasUpdates = true)
50 50   #end
51 51   #end
... ... @@ -52,19 +52,16 @@
52 52   #end
53 53   #end
54 54  
55 - #if(!$hasUpdates)
56 - 此版块近期没有更新。
56 + ## 仅在有更新时显示标题和内容
57 + #if($hasUpdates)
58 + ## 输出标题
59 + =$topPage=
60 + ## 输出内容
61 + $output
57 57   #end
58 58  #end
59 59  {{/velocity}}
60 60  
61 61  
62 -(% class="col-xs-12 col-sm-6" %)
63 -(((
64 -=== 相关链接 ===
65 -
66 -(% style="font-size:14px" %)[[北区AIO项目看板(IPV6访问)>>http://nas.nicebro.fun:57567||rel="noopener noreferrer" target="_blank"]]
67 -)))
68 -
69 69  
70 70  )))