add_schema_org - Twig Function
With this function you can add JSON-LD metadata to the current page. The function takes an array containing Schema.org data such as:
The above example uses the Event Schema.org Type. Using Twig’s do tag you could do:
Though typically you will want your controller to prepare said data.
When it comes to files Contao can automatically generate the appropriate JSON-LD metadata for your. For this the classes
FilesystemItem from the virtual file system, the legacy FilesModel as well as
the Figure classes have appropriate getters for that.
Arguments
jsonLd: An array containing JSON-LD metadata.