Changes for page 学校ページ テンプレート
Last modified by Super Admin on 2026/04/05 18:59
From version
35.1
edited by Super Admin
on 2026/03/10 14:36
on 2026/03/10 14:36
Change comment:
There is no comment for this version
To version
36.1
edited by Super Admin
on 2026/03/10 14:40
on 2026/03/10 14:40
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -1,5 +1,13 @@ 1 1 {{velocity}} 2 2 ## ===== 学校ページ テンプレート ===== 3 +## ページタイトルを学校名に設定({{html}}ブロックの前で実行する必要あり) 4 +#set($__titleObj = $doc.getObject('SeitokaiCode.SchoolClass')) 5 +#if($__titleObj) 6 + #set($__titleName = $__titleObj.getValue('schoolName')) 7 + #if($__titleName && $__titleName != '') 8 + $doc.setTitle($__titleName) 9 + #end 10 +#end 3 3 {{html clean="false"}} 4 4 ## メンテナンスバナー({{include}}ではなくインラインで記述し、<p>タグ挿入を回避) 5 5 #set($bannerDoc = $xwiki.getDocument('SeitokaiAdmin.MaintenanceBanner')) ... ... @@ -1012,10 +1012,6 @@ 1012 1012 } 1013 1013 // ページ読み込み時の初期化 1014 1014 document.addEventListener('DOMContentLoaded', function() { 1015 - // ページタイトルを学校名に置換(デフォルトでは学校コードが表示されるため) 1016 - var titleEl = document.querySelector('#document-title h1'); 1017 - var schoolNameVal = "$!escapetool.javascript($!schoolName)"; 1018 - if (titleEl && schoolNameVal) { titleEl.textContent = schoolNameVal; } 1019 1019 // デフォルトで現在の年度を表示 1020 1020 var defaultTab = document.querySelector('.activity-fy-tab.active'); 1021 1021 if (defaultTab) { defaultTab.click(); }