Is anyone able to tell me how i might make any and all Content Taxonomy field(s) display in the right sidebar during node edits, just as core's Taxonomy displays in the sidebar in Rubik by default?

I am using Node Form Columns and i don't know PHP... but i think i can guess where a solution would be implemented, as seen in the code below.

Any help would be greatly appreciated.

/**
 * Preprocessor for theme('node_form').
 */
function rubik_preprocess_form_node(&$vars) {
  $vars['sidebar'] = isset($vars['sidebar']) ? $vars['sidebar'] : array();
  // Support nodeformcols if present.
  if (module_exists('nodeformcols')) {
    $map = array(
      'nodeformcols_region_right' => 'sidebar',
      'nodeformcols_region_footer' => 'footer',
      'nodeformcols_region_main' => NULL,
    );
    foreach ($map as $region => $target) {
      if (isset($vars['form'][$region])) {
        if (isset($vars['form'][$region]['#prefix'], $vars['form'][$region]['#suffix'])) {
          unset($vars['form'][$region]['#prefix']);
          unset($vars['form'][$region]['#suffix']);
        }
        if (isset($vars['form'][$region]['buttons'], $vars['form'][$region]['buttons'])) {
          $vars['buttons'] = $vars['form'][$region]['buttons'];
          unset($vars['form'][$region]['buttons']);
        }
        if (isset($target)) {
          $vars[$target] = $vars['form'][$region];
          unset($vars['form'][$region]);
        }
      }
    }
  }
  // Default to showing taxonomy in sidebar if nodeformcols is not present.
  elseif (isset($vars['form']['taxonomy'])) {
    $vars['sidebar']['taxonomy'] = $vars['form']['taxonomy'];
    unset($vars['form']['taxonomy']);
  }
  // Modification showing any and all Content Taxonomy field(s), if present, in sidebar
  elseif (module_exists('content_taxonomy')) {
    // Here's where the magic happens.
  }
}

Comments

stephen Piscura’s picture

Sorry for the unclosed <em> tag in the second sentence. My mistake.

aramboyajyan’s picture

Status: Active » Closed (won't fix)

All old and outdated 6.x issues are being closed.
Maintainer support will be provided only for major / blocking issues.

If you feel like this issue should be re-opened, feel free to do so.

Thanks!