tags:

views:

75

answers:

2

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
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
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
That module works for me.
Kevin
It works for me too, just not with a custom errorpage. The module doesn't support it.
Tommy

related questions