What would be the best way to create a front page that has a different layout than the rest of the site on drupal 6?

To be a bit more specific, I want my header and sidebars to display as usual but only the "main content" area to have a different layout.

Thanks in advance.
Nimi.

Comments

jtjones23’s picture

front page module - http://drupal.org/project/front

I think a Drupal 6 version is coming.

abu3abdalla’s picture

look i had used this module but it had some bugs.so that i hate this module

abu3abdalla’s picture

i think it depends on ur expertise so that if u know php and html and css u can make a custom page-front.tpl.php and their r a full documents and tutorials in drupal handbook but if u do not know php and css u must use panels module http://drupal.org/project/panels but it still do not have the D6 version so that the best way is to make it by ur hand.

if u like i can help u in my spare time (( only 1000$/hour )) heheh i am kidding man i can help u free.

salam mean peace in arabic.

Michelle’s picture

Panels isn't available for Drupal 6 yet and won't be for some time.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.

abu3abdalla’s picture

i know that and i have said that but i hope if it will be available soon.

Michelle’s picture

Ah, so you did. Your posts are difficult to read with all the missing letters so I just picked out the reference to panels.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.

joep.hendrix’s picture

to create a template file page-front.tpl.php.
This template will only be used for the front page. It is the core standard theming method.

-----------------------------------------
Joep
CompuBase, Drupal websites and design

-----------------------------------------
Joep
CompuBase, Dutch Drupal full service agency

modul’s picture

Another way (in Drupal 5.7 at least, I don't know about 6.x) is to take any node, no matter what, as your front page. You indicate the node nid in the admin section, under http://yoursite.com/?q=admin/settings/site-information, fill in node/12345, and that's it. Then, in page.tpl.php, you can include some logic to make that page different from the rest:

if ($node->nid == 12345) {
   echo "This is the very impressive front page.";
} else {
   echo "Nah, this is just a regular page.";
}
Michelle’s picture

If you're going to go that route, you could do page-node-12345.tpl.php as well.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.

nimi’s picture

Thanks everyone for your quick responses.

I think I'll go with the "page-front.tpl.php" template method.
One more question though, how would I configure drupal to use this new template file only for the front page?

Nimi.

modul’s picture

Drupal is smart enough to figure that out all by itself. Therefore, the name you give to your template files, page-front.tpl.php, is of vital importance, because the files names are essential in this process. That's also true, for instance, for the templates you use for your various content types. They should be called "node-inventory.tpl.php", "node-diary.tpl.php", "node-my_content_type.tpl.php" etc. So, just call it "page-front.tpl.php", and watch how Drupal finds and uses it.