I am trying to move the meta tags form to its own primary tab using the following:

function graphtek_seo_menu() {
  $items = array();

  $items['node/%node/seo'] = array(
    'title' => 'SEO',
    'description' => 'Manage SEO',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('metatag_form'),
    'access arguments' => array('use page manager'),
    'theme callback' => '_node_custom_theme',
    'type' => MENU_LOCAL_TASK,
    'weight' => 4,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  );

,
but I cannot simply do that, since metatag does not implement hook_form.
It creates the FAPI array using metatag_metatags_form, but in order to even call that function metatag_field_attach_form has to be called first, and then metatag_form_alter calls metatag_metatags_form with the appropriate parameters. I read this was implemented this way due to http://drupal.org/node/1284642, but does anyone know of a hack I can use to move the form to its own tab?

Comments

DamienMcKenna’s picture

You might need to use an after-build callback ($form['#after_build']) and then modify the 'metatag' array, but I haven't personally tried it.

DamienMcKenna’s picture

Issue summary: View changes
Status: Active » Fixed

Please feel free to reopen if you need more help getting this to work.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.