- π«π·France frondeau Nantes, FRANCE
Hello,
I agree with W01f β .
A README.md file should exist for this technical module.
This module is using shortcuts module to create contextual shortcuts for the concerned nodes.
Only one route is set to create the concerned shortcut. The way to use it is a bit reversed as we don't know at once how to reach the configuration form.These are the steps I've followed for my first structured data:
STEP 1: Get the url node id you want to add the structured data to.
ID example: 226.STEP 2: use the default url from the one routing like this
route path is: /structured_data/page/json/{sd_route_name}/{sd_url}/{sd_bundle}/{sd_entity_id}
execute the url /structured_data/page/json/{sd_route_name}/{sd_url}/node/226
This url will open a config form with the parameters aboveSTEP 3: in the displayed form, replace the unkknown parameters{sd_route_name} and {sd_url} by :
sd_route_name -> node-226.structured-data (as an example)
sd_url ->
Fill the Json Ld field.STEP 4: display the concerned node as a contributor with the related permission or as an administrator
Watch in the shortcuts location: "Json-ld" that will get back to the node JSON-LD. - πΊπΈUnited States rex.barkdoll
Thank you everyone for this thread. I'm adding my voice to the request for instructions and a readme file to be included in the module.
I also noticed, for any novices out there that if you run into a PHP error, there are currently 2 modules ( entity_usage π Error: Call to private method in entity_usage_form_alter() Needs review and conditional_fields π Error while using with Structured Data module Needs review ) that have patches in order to be able to allow this module to work. It looks like it's not this module's fault, but I it was annoying figuring that out.
The error includedCall to private method "Drupal\structured_data\Form\PageJsonForm"
The follow up question I have is, do we manually fill in the structured JSON data by hand for every page? I was hoping we could define some tokens and have the JSON be generated for each page, but it's looking like I have to go fill the JSON data in manually on every page. Is that correct or am I misunderstanding how this module works?
I'm concerned because I'm looking at 10,000+ pages and I can't imagine doing that by hand.
Also, I'm attaching a picture of the structured data json form so other people know what it looks like when they get there.