【问题标题】:Gmail Inbox View Action - "A value for the url field is required."Gmail 收件箱查看操作 - “url 字段的值是必需的。”
【发布时间】:2016-12-10 18:04:05
【问题描述】:

我正在尝试为用于重置密码的 Gmail 收件箱操作获取正确的标记。我正在使用Email Markup Tester。

我的标记如下所示:

<div itemscope itemtype="http://schema.org/EmailMessage">
  <meta itemprop="description" content="Reset password instructions"/>
  <div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
    <meta itemprop="target" content="https://www.example.com/users/password/new?token=123"/>
    <meta itemprop="name" content="Reset Your Password"/>
  </div>
  <meta itemprop="description" content="Visit our site to reset your password."/>
</div>

以上标记返回错误:

url 字段的值是必需的。

但我不知道应该如何将 url 字段插入到标记中。甚至 Google's example 也未能通过他们的标记验证器。

【问题讨论】:

    标签: gmail html-email schema.org microdata google-schemas


    【解决方案1】:

    (不确定这是否只是他们的测试工具的错误,或者这是否真的是一个没有记录的新要求。)

    您可以将url 属性in addition 提供给target 属性。另请注意,如果值为 URL,您 have to 使用 link 元素(而不是 meta 元素)。

    原来是这样:

    <link itemprop="target url" href="https://www.example.com/users/password/new?token=123" />
    

    这会在 Google 的电子邮件标记测试器中报告没有错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-12-02
      • 1970-01-01
      • 2023-02-07
      • 1970-01-01
      • 1970-01-01
      • 2014-12-19
      • 2019-04-29
      相关资源
      最近更新 更多