Skip to content

Customize views based on entity type? #86

Answered by bergos
saumier asked this question in Q&A
Discussion options

You must be logged in to vote

@saumier The main work to render the triples in the html page is done by the template that injects the triples as JSON-LD into a script element and the render-ld.js script, which creates the html. It would be possible to replace the standard renderer, if you want to replace the standard output with custom code. It's also possible to just add more js code for additional output. Maybe start with the last option, once you have something useful running, you can decide if you want to replace the default rendering. Here is an example js code that adds a map if there is a triples with the main subject and the predicate http://schema.org/hasMap. The result looks like this.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@saumier
Comment options

@ktk
Comment options

Answer selected by l00mi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants