By pureh2o on
Hi,
I would like to add the following line in my head tag
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
Do you have any ideas on how to achieve this the easiest?
I've been searching but couldn't find the exact module / way of adding it.
Can I add it in template.php?
Many thanks
Comments
You could do it with theming
You could do it with theming This handbook may help you Theming Guide. See in particular this file html.tpl.php.
For modules, you could try this one Head.
Add into html.tpl.php
If you're looking to implement this in code, rather than through a module, the place to add it is a template file called
html.tpl.phpDepending on which theme you're using, there may or may not be a file with that name in your
/sites/all/themes/<theme name>/templatesfolder.If there isn't, your theme will be inheriting it from the system module:
/modules/system/html.tpl.phpIf you copy this file into your theme's templates folder, you can add the meta viewport tag there.
You may need to clear your caches to see the changes.
Good luck
Matt