公開終了日を設定したページへのリンクについて

2010年5月24日 at 18:29

初めまして。raihaと申します。
公開終了日を設定したページへのリンクについて教えていただきたいのです。

現在、公開設定を行っていない親ページから、公開終了日を設定した子ページにリンクを貼っております。
子ページの公開終了設定日以降、親ページにリンクが残っている場合、希望としてはnot foundのページが表示されて欲しいのですが、今はログイン画面(forbiddenページの様です)が表示されてしまいます。
公開終了日を過ぎたページに対するリンクをクリックした場合、一律でnot foundページを表示するように設定できますでしょうか?
どなたかお分かりになられる方、お教え願えますと幸いです。


使用中のconcrete5のバージョン:5.3.3.1

dispatcher.phpを変更すれば

2010年5月24日 at 21:17
/concrete/dispatcher.phpの157行目付近でページのパーミッション関係を処理しているので、

## Now that we have a collections and permissions object, we check to make sure
## everything is okay with collections and permissions

if ($cp->isError()) {
// if we've gotten an error getting information about this particular collection
// than we load up the Content class, and get prepared to fire away

switch($cp->getError()) {
case COLLECTION_FORBIDDEN:
$v = View::getInstance();
$v->setCollectionObject($c);
$v->render('/page_forbidden');
break;
}
}




## Now that we have a collections and permissions object, we check to make sure
## everything is okay with collections and permissions

if ($cp->isError()) {
// if we've gotten an error getting information about this particular collection
// than we load up the Content class, and get prepared to fire away

switch($cp->getError()) {
case COLLECTION_FORBIDDEN:
$v = View::getInstance();
$v->setCollectionObject($c);
$v->render('/page_not_found');
break;
}
}


にすればイケそうな気がします。
 

出来ました!ありがとうございます

2010年5月25日 at 10:24
taoさん

早速のご返信有難うございます。
試してみましたところ、希望通りの動作になりました!
大変助かりました、有難うございました。