views:

20

answers:

1

hi,

I've created for the first time a forum in Drupal. I've added some nodes (posts).

I would like to customize the order of the node components.

For example see this image: http://dl.dropbox.com/u/72686/forum-node.png

I would like to move the "Previous post - Next post" to the top, and move "Login to answer" on the bottom etc..

Is there any Drupal setting to do it, or I should work on the template ? Which is the template for forum nodes ?

Otherwise I can do with a module hook, I know how to change the forms components weight, but I dunno how to change the layout of the nodes.

Thanks

+1  A: 

Whenever you want to change to markup (HTML), you generally have to do it with theming. You wont find modules that give you options to move things around. That just too much work, and you can never make every one happy. Instead they set up the module to be overridden and provide a sensible default that most can use.

So with the Drupal theme kit, you generally have 3 options.

  • Override a theme function.
  • Override a template.
  • Create a preprocess function.

In this case, it looks like, there is a master template that organizes the initial post, the answers and the login option. You can find out if this is the case and how the page is created with devel themer. It's a good tool to help find templates and theme functions when you're new to Drupal theming.

googletorp
+1 - he will probably need to adjust more than one template for this, so devel themer is a good recommendation. A word of warning, though - devel themer has a tendency to interfere and/or break down with sites that make heavy use of JavaScript, so I'd enable it only temporarily, and eventually switch of JavaScript DOM manipulations if the results get fuzzy.
Henrik Opel

related questions