Custom Home Pages

Events happening in the community are now at Drupal community events on www.drupal.org.
john.arroyo's picture

There are lots of ways to create a nice homepage using your theme (page-front.tpl.php) or using modules like views, panels or front page (http://drupal.org/project/front).

My question is what kind of techniques do you tend to use for a rich homepage on a larger site? Is it all custom php in the theme or a combination of modules & custom php? Blogs and portfolio sites don't require much customization for an effective homepage, but what about sites that have a richer homepage that shows off the content of the site?

Any thoughts? I'm sure different designers and developers have their own recipes. I'm curious what are some of these recipes that you personally use. I'm looking for a high level view of how various people develop rich homepages.

thanks,
-John

Comments

At MrsRiley.com we used the

eidolon night's picture

At MrsRiley.com we used the Front Page module and were happy with the results. It was perfect for our project because we wanted different landing pages for anonymous and registered users.

WellToldTales.com uses Panels for home page

kevcol's picture

I used Panels for WellToldTales.com. I needed a flexible layout that had a combination of static items (join text), user-generated content (latest short stories) and editor's picks (the frontpage slideshow module.)

It works pretty well, but I plan to customize the CSS a bit more on the next generation of the site.

Custom PHP

benjaminlhaas's picture

I'm a programmer, and I'm generally comfortable more comfortable working with the code. For a couple of sites I've created that have a non-standard, feature-rich home page, I've gone the custom PHP route in Drupal 5. I do the content generation in a custom module, and then extend my theme for the home page.

Specifically, I create a new module that implements hook_menu, to create a home page at www.example.com/home. I write a callback function that fetches & generates any necessary content for the home page. I pass that content to the drupal function theme(), along with a custom hook name, such as 'home_page'. Then, inside my theme (supposing I'm using the zen theme), in template.php, I create a new function called zen_home_page(). That function gets and acts on the generated content, and sets up template variables. I use a special template, page-home.tpl.php for the home page, and tell phptemplate to use that template as a "suggestion."

Finally, inside the site admin section, in "Site Information," I set 'home' as the "default front page."

There's probably a better way to do this (almost certainly for Drupal 6), so maybe someone can weigh in here?