I have some checks in my preprocessing files for nodes. If one of them is true I would like to show my defined 404 page. How is this possible with a php call?

有帮助吗?

解决方案

Use this code:

if([YOUR_CHECKS]){
    drupal_not_found();
}

其他提示

You should use the drupal_not_foun() function

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top