-
Notifications
You must be signed in to change notification settings - Fork 100
Description
Custom properties can be displayed on Concept pages, because Concept::getProperties() reads the property labels (from the current resource description or by default by doin an extra SPARQL query) See https://github.com/NatLibFi/Skosmos/blob/master/model/Concept.php#L354
However, the display of the Vocabulary page does not work the same : instead of using ConceptProperty data structure, the (shortened) URI is used as key (https://github.com/NatLibFi/Skosmos/blob/master/model/Vocabulary.php#L147), and then translated in the Twig template to display DC labels (https://github.com/NatLibFi/Skosmos/blob/master/view/vocab-shared.twig#L12).
This has the following consequences :
- since $conceptscheme->properties() returns only shortened URIs, URIS that cannot be shortened are not in the returned array, and cannot be displayed by the Twig template;
- since we rely on translations to display the property labels, custom properties not in the translation file would be displayed with their URIs, and not their labels.
I suggest refactoring Vocabulary::getInfo() to use a similar approach than Concept:getProperties() , which also imply a refactoring of the vocad-shared template.
The use-case : we have a custom property on ConceptScheme that point to the open-data portal where vocabularies are described, and we would like this link to be displayed on the vocabulary page, so that user can navigate to the open data portal.