Créer des microdata imbriquées (hiérarchie d'éléments) avec des FieldGroup de plus de deux niveaux

More
9 years 1 month ago #66216 by 012abc
Ok, merci pour l'info. :)

J'ai d'autres priorités en fait.

J'ai lu aussi que Google recommondait JSON-LD pour le web sémantique (si je fais pas erreur).
"JSON-LD is the recommended format. Google is in the process of adding JSON-LD support for all markup-powered features. The table below lists the exceptions to this. We recommend using JSON-LD where possible."
developers.google.com/search/docs/guides...827812987&hl=fr&rd=1

Mais je ne vois pas comment implémenter JSON-LD avec Flexicontent. C'est peut-être un sujet pour rendre les contenus plus séduisants et améliorer l'expérience utilisateur avec les moteurs de recherche.

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

More
9 years 1 month ago #66325 by micker
en fait dans ton item.php tu peus charger les champs (regarde dans l'admin des template tu a des exeemple de code
<script type="application/ld+json">
{
"@context": " schema.org ",
"@type": "<?php echo lecodedetonchamptype ?>",
"url": "<?php echo lecodedetonchampurl ?>",
"contactPoint": [{
"@type": "ContactPoint",
"telephone": "+1-401-555-1212",
"contactType": "customer service"
}]
}
</script>

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
9 years 1 month ago - 9 years 1 month ago #66336 by 012abc
Dans la page source, il y a un "//" dans le "src" de l'image :
<img src="/images/stories/flexicontent//m_annonce-07032015-12.jpg" alt="Carburateur F/012 AMAC-AMAL" class="fc_field_image" itemprop="image">

Merci pour ton aide. :)
Last edit: 9 years 1 month ago by 012abc.

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

More
9 years 1 month ago - 9 years 1 month ago #66341 by 012abc
Google Search valide les JSON-LD créés avec le template modifier (index.php). Il trouve bien un type Product et un sous-type Offer.
Product
- Offer

Le seul truc, c'est que le JS apparaît dans le <body> et non dans le <head> de la page.
"Markup is placed inside a script tag in the head of the HTML page."

Pour mes microdatas créés avec les champs (field), c'est plus ambiguë pour les raisons indiquées précédemment.
Google Search valide, mais identifie deux types distincts : Offer et Product (au lieu de Product < Offer) avec une microdata qui n'est ni une url, ni un identifiant : "ID: http www.arbracam.org/content/89-boutique-terrot/flexicontent ."
Offer
Product

Avec les microdatas, j'ai créé une page événement en HTML dans un textarea. Google Search valide conformément au HTML ( www.arbracam.org/item/12296-bourse-motos...-%C3%A0-longvic.html ):
Event
- Location
- Offers
Pour la mise en page en revanche, c'est galère. Le modèle impose une certaine hiérarchie aux éléments qui ne correspond pas forcément à la forme que l'on veut présenter en frontend.

JSON-LD apparait préférable aux autres formats : "JavaScript notation separate from the body of the HTML itself." Même s'il a aussi ses propres limites.

Ce serait parfait si on pouvait remonter le JSON-LD généré par Flexicontent dans le <head>.

Je colle le JS pour qui veut s'en inspirer :
<script type="application/ld+json">
{
<?php
$html_img = $item->fields->display;
preg_match( '@src="([^"]+)"@' , $html_img, $match );
$src_img = array_pop($match);
?>
"@context": " schema.org/ ",
"@type": "Product",
"name": "<?php echo str_replace('"','',strip_tags($item->fields->display)); ?>",
"image": " www.arbracam.org ",
"description": "<?php echo str_replace('"','',strip_tags($item->fields->display)); ?>",
"offers": {
"@type": "Offer",
"url": " www.arbracam.org "priceCurrency": "<?php echo strip_tags($item->fields->display); ?>",
"price": "<?php echo strip_tags($item->fields->display); ?>",
"availability": "<?php echo strip_tags($item->fields->display); ?>"
}
}
</script>

Collé dans le index.php du template après le code :
// SEO
$microdata_itemtype = $this->params->get( 'microdata_itemtype');
$microdata_itemtype_code = $microdata_itemtype ? 'itemscope itemtype=" schema.org/'.$microdata_itemtype .'"' : '';
?>
Last edit: 9 years 1 month ago by 012abc.

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

More
9 years 1 month ago #66352 by micker
merci pour le retour
en fait tu peus passer cela dans le head mais avec de la programmation joomla
docs.joomla.org/Adding_JavaScript/fr

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
9 years 1 month ago - 9 years 1 month ago #66366 by 012abc
Merci. Mais je n'ai pas envie de monter une usine à gaz. C'est pas l'esprit d'un CMS.

J'ai fait un retour sur les microdatas qui dans certains cas peuvent faire la différence. Soit je m'y suis mal pris, soit il y a un sujet.
Last edit: 9 years 1 month ago by 012abc.

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

More
9 years 1 month ago #66368 by micker
pas de soucis c'est toi qui vois
il faut juste savoir que nous faisons notre possible, sur un composant gratuit avec support gratuit et documentation gratuite ...
c'est difficile de prévoir TOUS les cas ... mais je comprend tes retours

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
9 years 1 month ago #66371 by 012abc
Pas de soucis.

Voici les résultats fournis par Yandex pour une page.

Pour le json-ld, c'est ok.
Pour les microdatas, il manque "Offers" pour faire le lien entre "Product" et "Offer" ("offers field missing or empty").

Il y a ce "//" dans le lien d'image que j'ai corrigé dans le json-ld.

Soit le problème vient de ma configuration, soit il vient de l'extension.

Résultats de Yandex ( webmaster.yandex.com/tools/microtest/ ) :

"
jsonld
@type = (http://)schema(.)org/Product
(http://)schema(.)org/name
@value = Notice d'entretien 750 VATT
(http://)schema(.)org/image
@id = (http://)www.arbracam(.)org/images/stories/flexicontent/m_150629-boutique-arbracam-57-1.jpg
(http://)schema(.)org/description
@value = Notice d'entretien 750 VATT.
(http://)schema(.)org/offers
@type = (http://)schema(.)org/Offer
(http://)schema(.)org/url
@id = (http://)www.arbracam(.)org/content/89-boutique-terrot/9624-notice-d-entretien-750-vatt.html
(http://)schema(.)org/priceCurrency
@value = EUR
(http://)schema(.)org/price
@value = 5
(http://)schema(.)org/availability
@value = Épuisé

resource = (http://)www.arbracam(.)org/content/89-boutique-terrot/9624-notice-d-entretien-750-vatt.html

product
ERROR: Unmet requirement for product snippets: offers field missing or empty
itemType = (http://)schema(.)org/Product
name = Notice d'entretien 750 VATT
image
href = (http://)www.arbracam(.)org/images/stories/flexicontent//m_150629-boutique-arbracam-57-1.jpg
text = Notice d&#039;entretien 750 VATT

offer
itemType = (http://)schema(.)org/Offer
price = 5
pricecurrency = EUR
availability = Épuisé
"

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

More
9 years 1 month ago - 9 years 1 month ago #66381 by 012abc
Ce qu'il manque, c'est dans le FieldGroup la possibilité d'indiquer que "Offer" est une propriété de "Product" (c'est facultatif). C'est ainsi que se fait le lien entre les deux, avec " itemprop="offers" ".
Voici la balise complète au niveau du FieldGroup : <div itemprop="offers" itemscope itemtype=" schema.org/Offer ">

Tu peux trouver un exemple de code ici : schema.org/Product

Voici un extrait de code d'une page. On voit qu'il manque " itemprop="offers" " :

<div id="flexicontent" class="flexicontent fcitems fcitem9914 fctype11 fcmaincat87 menuitem529 group" itemscope="" itemtype=" schema.org/Product ">
<h1 class="contentheading">
<span class="fc_item_title" itemprop="name"> moteurs JAP - MAG </span>
</h1>
(...)
<div itemscope="" itemtype=" schema.org/Offer " style="display:inline-block;">Prix:
<strong>
<div style="display:inline" itemprop="price">700</div>&nbsp;
<div style="display:inline" itemprop="priceCurrency">EUR</div>
</strong>
- Disponibilité:
<strong>
<div style="display:inline" itemprop="availability">En stock</div>
</strong>
</div>
</div>

Voilà des pistes pour l'amélioration de la prise en compte des microdatas et de JSON-LD dans Flexicontent. :)
Last edit: 9 years 1 month ago by 012abc.

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

More
9 years 1 month ago #66382 by micker
ok on en prend note apres ... la grande question c'est json ou dans le html ... pas simple de tranché

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

Moderators: vistamediajoomlacornerggppdk
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
Save