Theming Node Forms

Ich habe zwar (leider) noch immer keine Seite mit Drupal 7 realisiert, aber egal. Die Themingmöglichkeiten in Drupal 7 sind trotzdem immer spannend:. Hier Theming Node Forms in Drupal 7.

Here is an example of how to theme the layout of node form using the theme engine in Drupal 7. We will theme the article content type, provided by default with Drupal 7.
Suppose that the article content type, has a taxonomy field field_tags. I want to put the taxonomy field in a seperated region called sidebar.
Also the form buttons, will be extracted and printed as $buttons variable, in seperated region.
Please note that Node form columns module can be alternative for this example.
First of all, let’s implement hook_theme(). You can implement it in your theme’s template.php or your custom theme. In our case we will do it in a custom module. Let’s call it MYMODULE.
Our theme output, will be through the template file article-node-form.tpl.php.

Possibly related posts (automatically generated)