Reference types via id only in Fluid templates
brotkrueml opened this issue · comments
As an integrator I want the possibility to reference types in Fluid templates.
Example in JSON-LD
[{
"@type": "BlogPosting",
"name": "Some title",
"author": {
"@id": "authorid"
}
}, {
"@type": "Person",
"@id": "authorid",
"name": "Arthur Dent",
}]
Example in Fluid
This does not work currently:
<schema:type.blogPosting name="Some posting">
<schema:property -as="author" -id="someauthor"/>
</schema:type.blogPosting>
<schema:type.person -id="someauthor" name="Arthur Dent">
Error:
Required argument "value" was not supplied.
Acceptance criteria
- The argument
value
inPropertyViewHelper
is not required anymore if anid
is given. - The rendered JSON-LD is valid (like in example above).
- The documentation contains an example for this case.
- A feature entry to the changelog is added.
Okay, have to read my documentation. This is possible by now with node identifiers:
<schema:type.blogPosting
name="42"
author="{schema:nodeIdentifier(id: 'https://example.org/#arthur-dent')}"
/>
<schema:type.person
-id="https://example.org/#arthur-dent"
givenName="Arthur"
familyName="Dent"
/>