Theming different node types

"Stefan Nagtegaal" <[email protected]> Wed, 3 Dec 2003 23:18:08 +0100
Newsgroups gmane.comp.php.drupal.user
Message-ID <00e701c3b9eb$54bbe900$58f2a33e@nagtegaazmljsa>
Is it possible to determine which node-type is being outputted and return
all the node-types in a different way?

I think about something like this, but that doesn't work:

<code>
function mytheme_node($node, $main = 0, $page = 0) {
  switch($node->type) {
    case 'blog':
      $output .= "That's the way. Uh-huh uh-huh! I like it. Uh-huh,
uh-huh!";
      break;
    case 'book':
      $output .= "That's the way. Uh-huh uh-huh! I like it. Uh-huh,
uh-huh!";
      break;
    case 'story':
      $output .= "That's the way. Uh-huh uh-huh! I like it. Uh-huh,
uh-huh!";
      break;
    case 'forum':
      $output .= "That's the way. Uh-huh uh-huh! I like it. Uh-huh,
uh-huh!";
      break;
    case 'event':
      $output .= "That's the way. Uh-huh uh-huh! I like it. Uh-huh,
uh-huh!";
      break;
    case default:
      $output .= "Default way of outputting nodes";
      break;
    }
  return $output;
}

</code>

Could someone tell me why this isn't working and what I should/could do
about it to let it work?



Stefan

-- 
[ Drupal user list | http://list.drupal.org/ ]
[ http://lists.drupal.org/options/drupal-user/gcpdu-drupal-user%40gmane.org ]