[support] using an alternate front page

J-P Stacey jp.stacey at torchbox.com
Mon Jul 2 08:51:26 UTC 2007


Jean Gazis wrote:
> The client sent me a mock-up home page, after seeing the site in 
> progress. (Mine looks much nicer, but whatever.) I want to put theirs as 
> the front page with an "enter site" link to the welcome page in Drupal.
> 
> Alternatively, could I make a drupal node that has no menus, blocks, or 
> theme? It just needs to have 2 logos and 2 lines of text.

You could stick your "front page" in a block. Then make that block only 
appear on the front page by restricting it to "<front>", and also set its 
content type to executable PHP.

Then, at the bottom of the block, put:

	<?php exit(); ?>

I think that would prevent Drupal from slurping the evaluated content of the 
block off standard output, so it would go straight to the browser. There 
might be unwanted side effects of this, though: you might have difficulty 
logging in to remove the hack, for example. In which case you could perhaps 
put it in block.tpl.php and check for the block ID. You certainly wouldn't 
want to do this on a long-term basis as it's a terrible hack.

Thoughts, anyone?

J-P


More information about the support mailing list