本文介绍了如何使用Schema.org识别酒店搜索网站上的过滤器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个旨在帮助用户找到酒店的网站。我们有很多小工具可以过滤我们展示的酒店(例如价格过滤器)或订购我们展示的酒店(例如按距离)。



我可以看到将我们的酒店标记为。以及如何传达列表的。



 < div itemscope itemtype = http://schema.org/Hotel\"> 
< div itemprop =imagestyle =background-image:url('{{{imageUrl}}}');>< / div>
< h2 class =titleitemprop =name> {{name}}< / h2>
< div itemscope itemtype =http://schema.org/Offer>
< div itemprop =price> {{{price}}}< / div>
< / div>
< / div>

有没有办法将我们的过滤器识别为调整列表的工具?



要了解网站的运作方式,请参阅 - 。

解决方案

使用类型。



参见或者()。



行动可以是用于表示发生的事情(例如,用户3在阿姆斯特丹搜索酒店),但也用于代表发送潜在行动:使用属性指定可能的行为项目可以拥有的操作。

 < section itemscope itemtype =http:// schema。组织/ ITEMLIST> 
< div itemprop =potentialActionitemscope itemtype =http://schema.org/SearchAction>
...
< / div>
< / section>



关于标记的附注




  • 您的图片属性不起作用,它无法在样式中指定图像属性为值。您必须在link元素上提供 image 属性(例如, img a 链接,...)。


  • 您的优惠酒店无关。您可以使用属性。



I'm working on a site designed to help a user find a hotel. We've got lots of widgets for filtering the hotels we show (e.g. price filters) or else ordering the hotels we show (e.g. by distance).

I can see how to markup our hotels as being a list. And also how to communicate the sort order of the list.

And we're already marking up the hotel's themselves:

<div itemscope itemtype="http://schema.org/Hotel">
    <div itemprop="image" style="background-image: url('{{{ imageUrl }}}');"></div>
    <h2 class="title" itemprop="name">{{ name }}</h2>
    <div itemscope itemtype="http://schema.org/Offer">
        <div itemprop="price">{{{ price }}}</div>
    </div>
</div>

Is there a way of identifying our filters as being tools for adjusting the list?

To get an idea of how the website works see - http://mapov.com/hotels/the+strip/.

解决方案

With an Action type.

See SearchAction or perhaps FindAction (DiscoverAction).

An Action can be used to represent what happened (e.g., "User 3 searched for hotels in Amsterdam"), but also for representing potential actions: use the potentialAction property to specify the possible actions an item can have.

<section itemscope itemtype="http://schema.org/ItemList">
  <div itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
    …
  </div>
</section>

Side notes about your markup

  • Your image property won’t work, it can’t have an image specified in the style attribute as value. You have to provide the image property on a "link" element (e.g., img, a, link, …).

  • Your Offer is not associated with the Hotel. You could use the makesOffer property.

这篇关于如何使用Schema.org识别酒店搜索网站上的过滤器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 21:44