Hi!
I trying to configure Ratings stars for Google Microdata
I can't understand, hot to get ratingValue
This is code with already working parameters:
aggregateRating [AggregateRating]:
worstRating:
bestRating:
ratingCount:
But without ratingValue
Thanks!
I trying to configure Ratings stars for Google Microdata
I can't understand, hot to get ratingValue
This is code with already working parameters:
aggregateRating [AggregateRating]:
worstRating:
bestRating:
ratingCount:
But without ratingValue
<?php if($params->get('itemRating')): ?>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="itemRatingBlock"> <span><?php echo JText::_('K2_RATE_THIS_ITEM'); ?></span>
<meta itemprop="worstRating" content="1">
<meta itemprop="bestRating" content="5">
<div class="itemRatingForm">
<ul class="itemRatingList">
<li class="itemCurrentRating" id="itemCurrentRating<?php echo $this->item->id; ?>" style="width:<?php echo $this->item->votingPercentage; ?>%;"></li>
<li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a> </li>
<li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a> </li>
<li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a> </li>
<li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a> </li>
<li> <a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_5_STARS_OUT_OF_5'); ?>" class="five-stars">5</a> </li>
</ul>
<div id="itemRatingLog<?php echo $this->item->id; ?>" class="itemRatingLog" <?php echo $this->item->numOfvotes; ?></div>
<meta itemprop="ratingCount" content="<?php echo (preg_replace('/[^0-9]/', '', $this->item->numOfvotes)); ?>"/>
</div>
</div>
<?php endif; ?>Thanks!
Edited 11 years 3 months ago by Roman Lipatov