README.txt 3.4 KB

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