Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By surfgatinho on
Hi,
I've built a custom module and would like to be able to set various metatags such as 'description', 'canonical' and some open graph stuff too.
I use the Metatag module to do this on my general content but would like some of the module generated content to hook into this, possibly via the Metatag API. However, I haven't got very far and can't find any examples / documentation.
Any help, much appreciated.
Thanks,
Chris
Comments
If I recall correctly, you
If I recall correctly, you can do this with drupal_add_html_head().
Thanks.
Thanks.
Will look into it. Looks like it should.
For some reason I got a little fixated on doing this through the Metatag API...