I am trying to design a site but what I want is similar to "blocks" (not sure if this is the term) that i see on the admin page (Content management, Site building, Site configuration etc). Anyone have an idea how I can set this up on my front page (with my headings of-course).

Comments

margaridacarvalho’s picture

To create your custom frontpage you have several options:

- using views module, default view:frontpage;
- panels module by creating a panel-page and overriden the default frontpage : http://drupal.org/project/panels;
- using views and panels modules together: http://drupal.org/node/206792;
- frontpage module : http://drupal.org/project/front;
- using template suggestions like page-front.tlp.php : http://drupal.org/node/190815;

It seems to me that for the frontpage you want it would be ok to use views and panels modules together. But explore the solutions and see which option suits your situation the best.

escoles’s picture

Links broken due to semi-colons at end:

- panels module by creating a panel-page and overriden the default frontpage : http://drupal.org/project/panels
- using views and panels modules together: http://drupal.org/node/206792
- frontpage module : http://drupal.org/project/front
- using template suggestions like page-front.tlp.php : http://drupal.org/node/190815

dnewkerk’s picture

I detailed some of the various ways to make front pages in Drupal here http://www.davidnewkerk.com/book/4

escoles’s picture

keyz gives high-level description of a technique using blocks and regions that's surprisingly easy, especially in D6. You can do it by some simple hacking to the .info file of a theme, and then hacking a copy of your page.tpl.php file. I gave up on Panels 3 and did it this way, and it took 45 minutes (after wasting hours trying to get it working in Panels 3).

The high level summary of what you'd do is this:

1 - Create a bunch of regions that you will only use on the home page. In Drupal 6 you can do this by hacking the [theme name].info file, which is in the root of the directory for a given theme. Copying region declarations and given them new names and descriptions will cause new regions to appear in the Blocks page for that theme.

For example, you might put an entry like this into your .info file to create a region that would be displayed as the left column on a home page:

regions[home_column_left] = Home Left Column

2 - Create a new front page by copying your page.tpl.php and naming it page-front.tpl.php.
3 - Replace the calls to display the normal regions with calls to display the ones you've just created. Be sure to tag everything so you can control the display from your stylesheet.

For example, I've got something similar to this in the home page I'm working with right now:

if ($leftcolumn || $rightcolumn):
	print "<div id=\"body-row\" class=\"clear-block\">\n";
	if ($leftcolumn) { ?><div id="leftcolumn" class="column"><?php print $leftcolumn ?></div><?php }
	if ($rightcolumn) { ?><div id="rightcolumn" class="column"><?php print $rightcolumn ?></div><?php }
	print "</div>\n";
endif;

(I've got 4 rows in total on this design, each with two or three columns.)

4 - Once you know it's working, assign blocks to the regions that are displayed only on the home page.

You can use Node As block or Block Node to get blocks from nodes; Views can easily be displayed as blocks; and clever use of Reptags can help you re-use blocks that have already been assigned to other regions. Doing it this way has taken me much less time, from scratch, than it typically takes me to set up a Panels page that's compliant with our designers' and creative director's requiremtnts. Block Classes gives you the tools to control specific blocks with generic classes, so you don't have to edit your CSS every time you swap out blocks -- just give the block a new style class (or classes).

IMO Panels is a bit too much like a shopsmith on steroids at this point: Trying to be all things to all people, where biting the bullet and coding a custom page may be a better answer. I actually feel as though working with Panels has probably cost me time, overall, since it can be very difficult to style Panels' HTML with CSS in the stylesheet.