Grayside.Org

Home

Moving OpenAtrium Node Form Elements to the Right Column

grayside — Sat, 03/06/2010 - 12:01

Previously, I discussed how you could move CCK fields into the node form sidebar by careful fieldgroup naming.

If you are of a programmer’s bent, you might instead try the more flexible programmer’s solution—preprocessor function. I dug this out of the atrium_blog feature.

This code snippet isolates a nodereference field attached to blog content and pushes it into the sidebar. This should work to move entire fieldgroups of form elements too.

/**
* Preprocessor for theme('node_form').
*/
function atrium_blog_preprocess_node_form(&$vars) {
  if (!empty($vars['form']['field_referenced_book_page'])) {
    $vars['sidebar']['field_referenced_book_page'] = $vars['form']['field_referenced_book_page'];
    unset($vars['form']['field_referenced_book_page']);
  }
}

  • node-form
  • openatrium
  • Add new comment

Similar Posts

  • CCK Fields and the Open Atrium Node Form
  • Remove CCK Fields from the Node Form

Monthly archive

  • July 2010 (2)
  • June 2010 (6)
  • May 2010 (9)
  • April 2010 (5)
  • March 2010 (6)
more

Feeds

  • Syndicate contentHeadlines
  • Syndicate contentDrupal Planet
  • Syndicate contentAtrium Headlines

casetracker cck drupal features FL3 freelinking module og openatrium permissions plugin spaces
<all>

© 2009 grayside.org ♠ Glossary ♠ Powered by Drupal ♠ Floating on Archlinux