2014-12-12 9 views
0

내 제품 페이지에 대한 Google 리치 스 니펫을 만들려고합니다. 나는이 제품 내부조직에 대한 쿠폰이있는 제품 용 마이크로 데이터

<div itemscope="" itemtype="http://schema.org/Product"> 
    ... 
</div> 

를 사용하여 제품을 만든

, 나는

<div itemscope="" itemtype="http://schema.org/Product"> 
    <div itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"> 
    ... 
    </div> 
</div> 

로 만든 제공, 내가 제공하는 판매자 속성 (조직)를 추가 할 수 있습니다 그러나 제 HTML 구조는 상품하에 판매자가 있으며 상품에 포함되지 않습니다.

<div itemscope="" itemtype="http://schema.org/Product"> 
    <div itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"> 
    ... 
    </div> 
    <div itemprop="seller" itemscope="" itemtype="http://schema.org/Organization"> 
    ... 
    </div> 
</div> 

그러나 Google 구조화 데이터 테스트 도구를 좋아하지는 않습니다.

난 후 제공

<div itemscope="" itemtype="http://schema.org/Product"> 
    <div itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"> 
    <meta itemprop="seller" itemref="provider"> 
    ... 
    </div> 
    <div id="provider" itemscope="" itemtype="http://schema.org/Organization"> 
    ... 
    </div> 
</div> 

meta -tag을 조직에 itemref를 사용하여 사용하여 시도했지만 여전히 조직으로 판매자를 인식하지 않는 것 같습니다.

내가 뭘 잘못하고 있니?

답변

1

올바르게 itemref를 사용하지 않는 :

  • itemref 속성 itemscope와 요소에 지정해야합니다.
  • itemprop 인 요소를 참조해야합니다.

그래서 예는 다음과 같다 할 것이다 :

<div itemscope itemtype="http://schema.org/Product"> 
    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" itemref="provider"> 
    </div> 
    <div id="provider" itemprop="seller" itemscope itemtype="http://schema.org/Organization"> 
    </div> 
</div> 

그러나이 방법으로는 seller 속성이 두 항목 ProductOffer에 추가되기 때문에이 ,을 작동하지 않습니다. Productseller 속성을 가질 수 없기 때문에 유효하지 않습니다.

따라서 중첩을 변경하거나 Product을 컨테이너 div에 사용하지 마십시오.

그러나, 못생긴 수정도있다 : itemscope와 더미 요소를 추가 :

<div itemscope itemtype="http://schema.org/Product"> 
    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" itemref="provider"> 
    </div> 
    <div itemscope> 
    <div id="provider" itemprop="seller" itemscope itemtype="http://schema.org/Organization"> 
    </div> 
    </div> 
</div> 
+0

감사합니다. 따라서 오래된 콘텐츠 레이아웃을 유지하고 적절한 스키마 마크 업을 가질 방법이 없습니까? –

+0

@MadsOhmLarsen :'div' 요소를 추가 할 수 없다면 (그래서'Product'는 모든 것에 대한 컨테이너가 아닙니다), 솔루션을 생각할 수 없습니다. – unor