I need to put a meta NOINDEX tag in head conditionally to a CCK field value ("visibility=private") in one specific content type ("projects").
I read about drupal_add_html_head($data = NULL, $key = NULL) but I'm not sure where to put it.
If I could put the tag in body I would just use a computed_field, but as I need it to be in head, should I put it on my own module (but on which hook?) or should I copy/insert it in html.tpl.php ?
My problems are (a) that if html.tpl.php will change then I'll have to change also the copy I overridden; (b) then I'm also not sure I have access to $entity inside the template (I never used them) and, finally, (c) that being a matter of logic rather than presentation a module maybe is more indicated than a template. For all this reasons I would prefer a custom module. Would it be possible ?