1

Google カスタム検索エンジンを使用する新しい Google サイトリンク検索ボックス リッチ スニペット ( https://developers.google.com/webmasters/richsnippets/sitelinkssearch ) をサイトに実装したいと考えています。

<div id="cse-search-form">
    <form itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction" id="cse-search-box" action="/suche/q.php">
        <meta itemprop="target" content="http://www.example.com/suche/q.php?cx=017002835581306790937%3A802l7atpqxs&ie=UTF-8&q={q]&sa=Suchen"/>
        <input type="hidden" value="017002835581306790937:802l7atpqxs" name="cx">
        <input type="hidden" value="UTF-8" name="ie">
        <input itemprop="query-input" id="googleSearchField" type="text" size="31" name="q" style="background: url("https://www.google.com/cse/images/google_custom_search_watermark.gif") no-repeat scroll 50% 50% transparent;">
        <input class="btn" type="submit" value="Suchen" name="sa">
    </form>
</div>

これはうまくいくと思いますか?

4

1 に答える 1

1

このプロパティが属する親アイテムを表示せずにpotentialActionプロパティを使用しています。アイテムはおそらくここWebSiteで最も理にかなっています (Google によって文書化されているように)。

targetプロパティの変数は{q]ですが、おそらく を意味していたでしょう{q}

Googleがそれを要求するかどうかは明らかではありませんが、仕様にプロパティがリストurlされているため、次を追加することをお勧めします。

<link itemprop="url" href="http://www.example.com/"> <!-- use the canonical URI of your homepage here -->
于 2014-09-10T14:14:58.113 に答える