Skip to main content
removed tags from title
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

7: How to correctly add meta tags to custom menu items?

Source Link
rockstardev
  • 1k
  • 4
  • 23
  • 47

7: How to correctly add meta tags to custom menu items?

I want to be able to use the meta tag module for everything my site, but currently I have no idea how to add meta tags to custom pages. For example, I have this page:

function mymodule_menu() 
{ 
    $items = array();
    $items['home'] = array(
      'title' => 'Home',
      'page callback' => 'mymodule_home_page',
      'access callback' => TRUE,
    );
    return $items;
}

function mymodule()
{
    $o = '';
    $o .= 'hello world';
    return $o;
}

Such a page doesn't get meta tags as it is a custom page. What is the best way to get meta tags on the page in this case? Or what is wrong with my strategy?