开发者

How do I move the tag section below the content in Drupal 6?

开发者 https://www.devze.com 2022-12-24 20:27 出处:网络
I have enabled tax开发者_如何学运维onomies in the form of Tag, and I would like the tag field to show up below the content when users are editing the page.Where would I make that setting change?For ed

I have enabled tax开发者_如何学运维onomies in the form of Tag, and I would like the tag field to show up below the content when users are editing the page. Where would I make that setting change?


For editing? You don't need code at all, provided you use the CCK module on your site.

Go to Admin > Content Types. Click on "manage fields" on the content type you want to edit, then drag the Taxonomy module form underneath the body. Hit Save, you're done.

For maximum control, you can also use the Content Taxonomy module which turns taxonomies into CCK fields.


You'll need to implement hook_form_alter() within a custom module to adjust the weights of the node edit form fields:

/**
 *  Implementation of hook_form_alter().
 */
function yourModule_form_alter(&$form, $form_state, $form_id) {
  // Is this a node edit form?
  if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id) {
    // Yes, adjust taxonomy weight to push it to bottom of form
    $form['taxonomy']['#weight'] = 42; // TODO: Find appropriate number by inspecting the other form element weights
  }
}

Edit: As bmann pointed out in a separate answer, this is not necessary if you have installed the CCK module on your site, as it adds a configuration option for the field order under 'admin > content types > manage fields'.


This is a sample from one of the node.tpl.php files in the themes/ directory.

<div class="taxonomy"><?php print $terms?></div>

If you move that code below

<div class="content"><?php print $content?></div>

It should work.

Assuming I've understood your question correctly!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号