Community & Support

Advice needed on a smart way to do columns

My goal is to convert my standard website to a Drupal-run website. Currently the site looks like this:

http://www.talent71.com

It's in finnish, but I bet you get the drift. Currently what I've been able to do with Drupal looks like this:

http://www.talent71.com/drupaltesti/

The sidemenus don't bother me, I'll get rid of them once I get the page the way I like it. The problem is that I've not found the smartest way to arrange the three nodes on the page to three columns. What would be the smartest way to do this? I also have problems figuring out a smart way to make the titles of the three nodes into links to different pages (like they are in www.talent71.com), and not links to the node itself. I want the three columns to be separate nodes for easy editing.

Any ideas?

Comments

Try Panels

Consider giving Panels module a try. Version 3 is still not quite ready in my experience, though you should be able to use 2 and upgrade later.

Here are a few additional possibilities to consider:
http://drupal.org/project/custompage
http://drupal.org/project/component
http://drupal.org/project/composite

An alternate approach could be http://drupal.org/project/nodesinblock ... you could then assign those blocks to your content region, and set them to display only on the <front> path. You can use some CSS floats to cause the blocks to display on the same line.

Forgot to answer your other

Forgot to answer your other question. I'd suggest adding a Link field to your content type for those titles (requires CCK if you don't have that yet). You can then specify a title and a custom link for it. If you need to custom theme the node's output to work for your exact needs, you can make a copy of node.tpl.php and name it node-yourtype.tpl.php. You can then customize it, such as deleting the regular node title if you want. Every field has pretty good default CSS classes you can use to custom theme them, however if you need precise control of the theming of each field that you can't do with only CSS, check out my article here: http://www.davidnewkerk.com/book/30

...

Perhaps a simpler method for the node titles is to just use a bit of conditional php in node.tpl.php.

In place of the usual...

<?php if (!$page): ?>
  <h2 class="node-title">
    <a href="<?php print $node_url; ?>" rel="bookmark"><?php print $title; ?></a>
  </h2>
<?php endif; ?>

Do this instead:

<?php if (!$page): ?>
  <h2 class="node-title">
    <?php
     
if ($node->nid == 1) {
        print
l(t('Link Text'), 'insert path here');
      }
      elseif (
$node->nid == 2) {
        print
l(t('Link Text'), 'insert path here');
      }
      elseif (
$node->nid == 3) {
        print
l(t('Link Text'), 'insert path here');
      }
      else {
        print
'<a href="'. $node_url .'" rel="bookmark">'. $title .'</a>';
      }
   
?>

  </h2>
<?php endif; ?>

You could place this code in a node-page.tpl.php template (i see you are using the Page content type for these nodes) so its not unnecessarily run for other node types. Just copy node.tpl.php and rename it, upload the clear the cache in Performance settings.

To make the 3 teasers site beside each other use CSS:

.front .node-teaser {
  float:left;
  margin:0 0 0.7em;
  padding:0 0 1.417em;
  width:33%;
}