Commit 5fb14ec06843d2fb0f2270f5a7bdaf2b94c77240

Authored by Yarik
1 parent b2298827

Comment structure data

common/modules/comment/views/artbox_comment_item.php
... ... @@ -18,12 +18,12 @@
18 18 echo Html::img('/img/user-noimage.png');
19 19 ?>
20 20 </div>
21   - <div class="user_data">
  21 + <div class="user_data" itemprop="commentTime">
22 22 <?php
23 23 echo date('d.m.Y', $model->date_add);
24 24 ?>
25 25 </div>
26   - <div class="user_name">
  26 + <div class="user_name" itemprop="creator">
27 27 <?php
28 28 if(!empty( $model->user )) {
29 29 echo $model->user->username;
... ... @@ -41,7 +41,7 @@
41 41 <?php
42 42 }
43 43 ?>
44   - <div class="user_txt">
  44 + <div class="user_txt" itemprop="commentText">
45 45 <?php
46 46 echo $model->text;
47 47 ?>
... ...
common/modules/comment/widgets/CommentWidget.php
... ... @@ -111,6 +111,9 @@
111 111 */
112 112 public $itemOptions = [
113 113 'class' => 'artbox_item_container',
  114 + 'itemprop' => 'comment',
  115 + 'itemscope' => 'itemscope',
  116 + 'itemtype' => 'http://schema.org/UserComments',
114 117 ];
115 118  
116 119 /**
... ...
frontend/views/catalog/product.php
... ... @@ -182,7 +182,7 @@
182 182 <?php
183 183 }
184 184 ?>
185   - <p><a href="#artbox-comment">
  185 + <p><a href="#artbox-comment" itemprop="interactionCount">
186 186 <?php
187 187 $comment_count = count($product->comments);
188 188 if($comment_count) {
... ...