文档更改Home
由 Yang Sheng 于 2025-02-42,18:57 最后修改
摘要
-
页面属性 (1 修改, 0 新增, 0 删除)
细节
- 页面属性
-
- 内容
-
... ... @@ -16,12 +16,13 @@ 16 16 ((( 17 17 === 近期更新 === 18 18 19 - 20 - 21 21 {{velocity}} 22 22 ## 定义一级链接列表 23 23 #set($topLevelPages = ["Home", "AI For Service", "AIO知识库", "脚本&自动化"]) 24 24 23 +## 定义需要忽略的页面标题列表 24 +#set($ignoreTitles = ["页面管理", "脚本&自动化"]) 25 + 25 25 ## 输出结果 26 26 #foreach($topPage in $topLevelPages) 27 27 = $topPage = ... ... @@ -32,29 +32,31 @@ 32 32 #set($query = $query.setLimit(3)) 33 33 #set($recentDocs = $query.execute()) 34 34 35 - # if($recentDocs.isEmpty())36 - Notupdates.37 - #el se38 - #f oreach($docFullNamein$recentDocs)39 - #set($doc ument = $xwiki.getDocument($docFullName))40 - # if($document)41 - t($docTitle=$document.getDisplayTitle())42 - ## 仅当用户有查看权限时显示43 - #if($ xwiki.hasAccessLevel('view', $xcontext.user,$document.getFullName()))36 + #set($hasUpdates = false) 37 + #foreach($docFullName in $recentDocs) 38 + #set($document = $xwiki.getDocument($docFullName)) 39 + #if($document) 40 + #set($docTitle = $document.getDisplayTitle()) 41 + ## 仅当用户有查看权限时显示 42 + #if($xwiki.hasAccessLevel('view', $xcontext.user, $document.getFullName())) 43 + ## 检查页面标题是否在忽略列表中 44 + #if(!$ignoreTitles.contains($docTitle)) 44 44 #if($docTitle == '') 45 45 #set($docTitle = "Untitled Document") 46 46 #end 47 47 * [[${docTitle}>>${document.getExternalURL('view')}]] 49 + #set($hasUpdates = true) 48 48 #end 49 49 #end 50 50 #end 51 51 #end 54 + 55 + #if(!$hasUpdates) 56 + 此版块近期没有更新。 57 + #end 52 52 #end 53 53 {{/velocity}} 54 54 55 - 56 -))) 57 - 58 58 (% class="col-xs-12 col-sm-6" %) 59 59 ((( 60 60 === 相关链接 ===