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/.
答案 0 :(得分:2)
有没有办法将我们的过滤器识别为调整列表的工具?
使用Action
类型。
请参阅SearchAction
或FindAction
(DiscoverAction
)。
Action
可用于表示发生的事情(例如,&#34;用户3在阿姆斯特丹搜索酒店&#34;),但也代表潜在行动:使用potentialAction
属性指定项目可能具有的操作。
<section itemscope itemtype="http://schema.org/ItemList">
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
…
</div>
</section>
您的image
属性不起作用,它不能将style
属性中指定的图像作为值。您必须在&#34;链接&#34;上提供image
属性。元素(例如img
,a
,link
,...)。
您的Offer
与Hotel
无关。您可以使用makesOffer
属性。
答案 1 :(得分:0)
<div itemscope itemtype="http://schema.org/Hotel">
<img itemprop="image" src="http://yourhostel.es/content/124"/>
<meta itemprop="address" content="you street"/>
<h2 class="title" itemprop="name">name </h2>
<div itemprop="priceRange">price</div><div itemprop="telephone">9999999</div>
价格