Sitelinks Searchbox - Rich Snippets

Einrad-Shop

Gut bekanntes Mitglied
3. November 2011
758
7
AW: Sitelinks Searchbox - Rich Snippets

Put the schema.org markup on your homepage.

PHP:
Your markup should have all the elements shown in the JSON-LD example below: 
<script type="application/ld+json">
{
   "@context": "http://schema.org",
   "@type": "WebSite",
   "url": "https://www.example-petstore.com/",
   "potentialAction": {
     "@type": "SearchAction",
     "target": "https://query.example-petstore.com/search?q={search_term_string}",
     "query-input": "required name=search_term_string"
   }
}
</script>

"url"—This property specifies the URL of your website. It must match the canonical URL of your domain's homepage.

"potentialAction:target"—This property specifies a search URL pattern for sending queries to your site's search engine.
Key points about the URL pattern:
It must include a string enclosed in curly braces that is a placeholder for the user's search query (e.g., {search_term_string}). The string inside the curly braces must also appear in the name attribute of the query-input property.
It must point to the same domain on which the markup is found.
An actual query string instead of the placeholder string must produce a valid search results page on your site.

"query-input"—the value for the name attribute of query-input must match the string enclosed inside curly braces in the target property of potentialAction.

Was muß man bei den Variablen einfügen?
PHP:
"target": "http://www.jtl-shop.com/navi.php?suchausdruck={search_term_string},

Was gehört aber bei "query-input" rein?