I have google adsense in a block, and I want to hide the block when the page is a "Page not found" error page. It's against adsenses TOS to show their ads on error pages. I figure there must be a way to write a php script to put in the Page specific visibility options. Does anyone know how to do this?
A:
You could make a custom error page and call it 404.htm and 403.htm and make those listed as 'Do not show on' paths.
You can do this through Settings > Error Reporting
Kevin
2010-04-10 16:41:10
A:
You can choose specific pages to be shown on errors if you go to /admin/settings/error-reporting
You should be able to use the block path settings so exclude a block from being used on of those pages.
VoxPelli
2010-04-10 16:43:28
Is there a way to make blocks visible in a custom errorpage? I used the blocks 404 module before, but it doesn't work with custom pages.
Tommy
2010-04-11 11:56:12
That module works for me.
Kevin
2010-04-11 23:16:05
It works for me too, just not with a custom errorpage. The module doesn't support it.
Tommy
2010-04-12 05:44:56