I want to get the node number (nid) for the node which is set for 403 and 404 pages in drupal configuration system. Can you please help me for this ?
3 Answers
You need to use
variable_get('site_403');
variable_get('site_404');
It will return a string like "node/1", then you just have to parse this string to get back the node ID.
You don't mention if this is via code or just admin screens. Through the admin screens you can view/edit what page is set for the 403 and 404 pages:
"Configuration > System > Site information"
Thanks all for answering this, I tried this
global $conf;
print_r($conf['site_403']);
It is working fine.