Inserting tags in HEAD section of a Drupal page

16 Jun 2013 . posts . Comments
#Drupal 7 #Module development

The “hook_html_head_alter()” can let you add tags to the HEAD section of a Drupal page. Despite some of the comments, I found that if you need to put it into a module in Drupal 7, you do need to name the hook after the module’s name, instead of just “template_“….

If you want to build tags… the Drupal way :-P… try the function theme_html_tag().

I found this was useful for a module I was writing… stay tuned people :-).


Me

Anthony is an Australian software engineer and mathematician. As a UTS MBT graduate, Anthony is the technology co-founder of a property and cycling-tech startup and enjoys teaching and learning coding with the Australian startup scene.