I've not been using Drupal for long (< 3 weeks) but have good knowledge of standard PHP, so I really don't know the 'Drupal' way of doing things yet.
What I'm trying to do is edit the canonical tag for a mobile site. The current path is realtive, however I need it to be absolute, and link to the desktop version of the site.
As far as I can tell the current implementation is not using any module to insert the canonical tag.
By looking at the source code of the rendered page the code appears to be contained in the $head
variable which is in html.tpl.php
as below
<head profile="<?php print $grddl_profile; ?>">
<?php print $head; ?>
<title><?php print $variables['field_meta_title']; ?></title>
I've come across a couple of pages like this one that mention things like template_process_html, drupal_get_html_head() and hook_html_head_alter() as relevant functions, but in that example the request is to remove the canonical tags, not to edit them.
I wouldn't mind using a module (providing it would allow me to change the link from www.mysite.com...
to m.mysite.com...
) but I would need to remove the current canonical tags which comes back to my orignial issue of not being able to find where it is.