README.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. Metatag: Mobile
  2. ---------------
  3. This submodule of Metatag adds a number of new meta tags commonly used for
  4. tailoring the experience of people using mobile devices.
  5. Mobile:
  6. <meta name="theme-color" value="[VALUE]" />
  7. <meta name="MobileOptimized" value="[VALUE]" />
  8. <meta name="HandheldFriendly" value="[VALUE]" />
  9. <meta name="viewport" value="[VALUE]" />
  10. <meta http-equiv="cleartype" content="[VALUE]" />
  11. iOS:
  12. <meta name="apple-itunes-app" content="[VALUE]" />
  13. <meta name="apple-mobile-web-app-capable" content="[VALUE]" />
  14. <meta name="apple-mobile-web-app-status-bar-style" content="[VALUE]" />
  15. <meta name="apple-mobile-web-app-title" content="[VALUE]" />
  16. <meta name="format-detection" content="[VALUE]" />
  17. <link href="alternative" value="ios-app://[VALUE]" />
  18. Android:
  19. <link href="manifest" value="[VALUE]" />
  20. <link href="alternative" value="android-app://[VALUE]" />
  21. Windows:
  22. <meta http-equiv="X-UA-Compatible" content="[VALUE]" />
  23. <meta name="application-name" value="[VALUE]" />
  24. <meta name="msapplication-allowDomainApiCalls" value="[VALUE]" />
  25. <meta name="msapplication-allowDomainMetaTags" value="[VALUE]" />
  26. <meta name="msapplication-badge" value="[VALUE]" />
  27. <meta name="msapplication-config" value="[VALUE]" />
  28. <meta name="msapplication-navbutton" value="[VALUE]" />
  29. <meta name="msapplication-notification" value="[VALUE]" />
  30. <meta name="msapplication-square150x150logo" value="[VALUE]" />
  31. <meta name="msapplication-square310x310logo" value="[VALUE]" />
  32. <meta name="msapplication-square70x70logo" value="[VALUE]" />
  33. <meta name="msapplication-wide310x150logo" value="[VALUE]" />
  34. <meta name="msapplication-starturl" value="[VALUE]" />
  35. <meta name="msapplication-task" value="[VALUE]" />
  36. <meta name="msapplication-task-separator" value="[VALUE]" />
  37. <meta name="msapplication-tilecolor" value="[VALUE]" />
  38. <meta name="msapplication-tileimage" value="[VALUE]" />
  39. <meta name="msapplication-tooltip" value="[VALUE]" />
  40. <meta name="msapplication-window" value="[VALUE]" />
  41. Configuration
  42. --------------------------------------------------------------------------------
  43. By default the two link alternative meta tags include a prefix - "android-app://" and "ios-app://". To remove this prefix just change the theme
  44. functions, e.g.:
  45. /**
  46. * Implements theme_metatag_mobile_android_app().
  47. *
  48. * Remove the default prefix.
  49. */
  50. function MYTHEME_metatag_mobile_android_app($variables) {
  51. // Pass everything through to the normal 'link' tag theme.
  52. $variables['element']['#name'] = 'alternative';
  53. // Don't actually want this.
  54. // $variables['element']['#value'] = 'android-app://' . $variables['element']['#value'];
  55. return theme('metatag_link_rel', $variables);
  56. }
  57. /**
  58. * Implements theme_metatag_mobile_ios_app().
  59. *
  60. * Remove the default prefix.
  61. */
  62. function MYTHEME_metatag_mobile_ios_app($variables) {
  63. // Pass everything through to the normal 'link' tag theme.
  64. $variables['element']['#name'] = 'alternative';
  65. // Don't actually want this.
  66. // $variables['element']['#value'] = 'ios-app://' . $variables['element']['#value'];
  67. return theme('metatag_link_rel', $variables);
  68. }
  69. Credits / Contact
  70. --------------------------------------------------------------------------------
  71. Originally developed by Damien McKenna [1].
  72. References
  73. --------------------------------------------------------------------------------
  74. 1: https://www.drupal.org/u/damienmckenna.