baserproject / basercms

baserCMS : Based Website Development Project
http://basercms.net
Other
164 stars 125 forks source link

baserCMS5公式ガイド 既存パネルの非表示化の説明通りに動作しません #3574

Open ibananlife opened 2 days ago

ibananlife commented 2 days ago

こんにちは。

baserCMS の実行環境

ローカル環境での baserCMS 配置 URL

http://basercms.local

上記のローカル環境で実行しました。

baserCMS5公式ガイド Home/5/theme/ダッシュボード拡張

https://baserproject.github.io/5/theme/dashboard

ダッシュボードパネル/既存パネルの非表示化

標準の状態で、ダッシュボードに配置されているのは次の3つとなります。タイトルの右の名称はダッシュボードパネルのファイル名です。

こちらを非表示にするには、同じ名前の空のファイルをテーマの次のパスに配置します。

 /plugins/{現在のテーマ}/templates/Admin/element/Dashboard/baser_news.php
 /plugins/{現在のテーマ}/templates/Admin/element/Dashboard/contents_info.php
 /plugins/{現在のテーマ}/templates/Admin/element/Dashboard/update_log.php

上記の説明通りに以下のようにテーマファイルを配置しました。

テーマファイルの配置

 isa@:~/devel/basercms/plugins/BcThemeSample/templates$ pwd
 /home/isa/devel/basercms/plugins/BcThemeSample/templates
 isa@:~/devel/basercms/plugins/BcThemeSample/templates$ ls -al
 合計 20
 drwxrwxr-x 5 isa isa 4096  7月  2 20:31 .
 drwxrwxr-x 6 isa isa 4096  7月  2 19:51 ..
 drwxrwxr-x 3 isa isa 4096  7月  2 20:31 Admin
 drwxrwxr-x 2 isa isa 4096  7月  2 19:51 element
 drwxrwxr-x 2 isa isa 4096  7月  2 19:51 layout
 isa@:~/devel/basercms/plugins/BcThemeSample/templates$ tree Admin
 Admin
 └── element
     └── Dashboard
         ├── baser_news.php
         ├── contents_info.php
         ├── hello.php
         └── update_log.php

 2 directories, 4 files
 isa@:~/devel/basercms/plugins/BcThemeSample/templates$ 

配置したファイルの内容は以下の通りです。

baser_news.php

 <h1>baser_news.php</h1>

contents_info.php

 <h1>contents_info.php</h1>

update_log.php

 <h1>update_log.php</h1>

hello.php

 <h1>hello.php</h1>

テンプレートファイルを配置した後でサーバーキャッシュ削除しました。

ダッシュボードには「baserCMSニュース」「コンテンツ情報」「最近の動き」が表示されたままでテンプレートは上書きされていません。

「ノーマルモード」でも「デバッグモード」でも表示は同じです。

上記ファイルの hello.php のみが以下の「新しいパネルの追加」説明通りに読み込まれて <h1>hello.php</h1> がダッシュボードに表示されます。

以前から何度か試していますが同じ結果です。

私のやり方が間違っていますか?

これが不具合であるならば 5.0.0 リリースの初めからの不具合だと思われます。

一応ご参考までに。

新しいパネルの追加

上記と同様の場所に、任意の名称のテンプレートファイルを配置することで、自動的にダッシュボードに読み込むことができます。

/plugins/{現在のテーマ}/templates/Admin/element/Dashboard/{your_panel_name}.php

ryuring commented 12 hours ago

@ibananlife 情報ありがとうございます。

おっしゃるとおり、ドキュメントが間違っておりまして、既にある管理画面用のテーマについて別のものを読み込ませるには、 管理システムテーマカスタマイズ に基づいて変更する必要があります。

ドキュメントを後で直しておきます。

ryuring commented 10 hours ago

@ibananlife マニュアル更新しておきました。 https://baserproject.github.io/5/theme/dashboard