Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By nimi on
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
Preferred way to create a cutom front page?
front page module - http://drupal.org/project/front
I think a Drupal 6 version is coming.
look i had used this module but it had some bugs.
look i had used this module but it had some bugs.so that i hate this module
i think it depend on ur expertise
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.
No Panels
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.
thx but i said that.
i know that and i have said that but i hope if it will be available soon.
...
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.
The standard way is
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
Another way is to take any
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 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.
Thanks everyone for your
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.
Drupal is smart enough to
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.