Microdatas et JSON-LD: existe-t-il un champ ou une variable utilisable "note moyenne" et "nombre de votes"

More
7 years 9 months ago #66546 by ggppdk
Hello

you have made some suggestions about microdate in another forum topic
see my answer there

also if you post in english it will be more easy to get an answer from me too


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #66912 by charlynancy

ggppdk wrote: Hello

in HTML view,
we already output ratingValue and ratingCount (inside aggregateRating):

Code:
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <meta itemprop="ratingValue" content="'.round($percent).'" /> <meta itemprop="bestRating" content="100" /> <meta itemprop="ratingCount" content="'.$rating_count.'" /> </span>

Hi Georgios,
in your code, itemprop="itemReviewed" is missing .
So the code should be
Code:
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <meta itemprop="itemReviewed" content="Name of the Entity" /> <meta itemprop="ratingValue" content="'.round($percent).'" /> <meta itemprop="bestRating" content="100" /> <meta itemprop="ratingCount" content="'.$rating_count.'" /> </span>

In our case the name of the entity is the title of the entry.

I can't find where is the file to edit to produce this result.
Could you help me and tell me where is the file to edit for adding this?

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #66913 by charlynancy
in file /components/com_flexicontent/classes/flexicontent.helper.php
~line 3268
i find the code
i add <meta itemprop="itemReviewed" content="'.$id.'" />
that give :
Code:
<meta itemprop="itemReviewed" content="'.$id.'" /> <meta itemprop="ratingValue" content="'.round($percent).'" /> <meta itemprop="bestRating" content="100" /> <meta itemprop="ratingCount" content="'.$rating_count.'" />
But that only give the id (number) of the entity
i can't obtain the title
i tried without success $item->title

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #66933 by charlynancy
Sorry, i realise that it is not a good way to ask a new question in an old post :blush: :blush:
So, i open a new post in troubleshooting part abouts this problem :
New Post URL

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.429 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline