Cliopatria customisation

Hello prologers,

I have my cliopatria docker container running and populated with data:
I would like to customise how some of the data is presented.

For example:
At
http://purl.org/alspac/alspac-data-catalogue-schema/gi_1000g_g0p_2016-11-22

I have a long list of ids which link to those items in my graph, I would like to show the names alongside the ids.

For example in the list of ‘has_container’ is alspacdcs:e0c7fe30-0254-4ca1-b16e-3de94005efad it would be nice to display the name ‘imputed’ next to this.

Is there a simple way to do this be adding code to my config_enabled folder? I see there is : cliopatria:list_resource//2 which sounds promising but I am unsure how to use it? Is there an example somewhere?

There is a hook rdf_label:display_label_hook(+Resource, ?Lang, -Label) that you can use to define how resources are displayed. If I get the docs right, list_resource//2 creates the entire local view page for a resource.

Thanks Jan I have now found that.

I have added :

cliopatria:display_link(X,Y) -->
    {iri_display(X,X2)},
    html(X2).

iri_display(literal(X),X):-
    !.
    
%http://purl.org/alspac/alspac-data-catalogue-schema/cnv_550_g1
iri_display(X,X2):-
    rdf_global_id(IRISpec, X),
    rdf(X,'http://schema.org/name',literal(Name)),
    format(atom(Atom),"~w ~t name:~w",[IRISpec,Name]),
    X2 = [a([href=X],
           Atom)],!.


iri_display(X,X2):-
    rdf_global_id(IRISpec,X),
    X2 = a([href=X],
           IRISpec).
iri_display(X,X2):-
    X2 = a([href=X],
           X).

Which does the job at the moment :slight_smile: Just need to make it display a little nice, I want to really have the default display for most things and in just some cases change that.