Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【コンテンツ管理】トップページについてコンテンツルーティングを上書きできない #3340

Open
ryuring opened this issue Apr 11, 2024 · 2 comments
Assignees
Labels
Adjusting 調整中

Comments

@ryuring
Copy link
Collaborator

ryuring commented Apr 11, 2024

概要

トップページについて、コンテンツ管理で管理されているルーティングを上書きすることができない。
トップ以外は非公開にすれば問題ないが、トップは非公開にしてもコンテンツフォルダのルーティングが生きているため対応不能。

プラグイン読み込み順を変更し、ルーティングの優先順を変えたとしても、 \BaserCore\Plugin で、ルーティングのリセット処理が入っているため、適用できない。

baserCMS version : 5.0.14

@ryuring ryuring added the Adjusting 調整中 label Apr 11, 2024
@ryuring ryuring self-assigned this Apr 11, 2024
@ryuring ryuring changed the title トップページについてコンテンツルーティングを上書きできない 【コンテンツ管理】トップページについてコンテンツルーティングを上書きできない Apr 17, 2024
@seto1
Copy link
Collaborator

seto1 commented Jul 4, 2024

プラグインのroutesではなく直下のconfig/routes.phpに記載すればトップもルーティングが効きました。
https://github.com/baserproject/basercms/blob/5.1.x/config/routes.php

これでいい気がしますが、もしくはBcContentsRoute->parseで / へのルーティングが存在するかチェックして存在したらreturnするとかでしょうか。
https://github.com/baserproject/basercms/blob/5.1.x/plugins/baser-core/src/Routing/Route/BcContentsRoute.php#L42

@ryuring
Copy link
Collaborator Author

ryuring commented Jul 5, 2024

@seto1 確認ありがとうございます。

プラグインのroutesではなく直下のconfig/routes.phpに記載すればトップもルーティングが効きました。

やっぱり一旦これで対応する感じですかねー
プラグインから介入できないのが気持ち悪くて、なんかいい方法がないかなと思って
もうちょっと置いておきます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Adjusting 調整中
Projects
None yet
Development

No branches or pull requests

2 participants