Hi,
First of all, I hope that after what happened last week in Valencia, you and your families, friends and acquaintances are well.
Sorry for the delay in replying but we haven't been able to test it until now.
We have adapted the example to our needs but when publishing we always get the null value.
I paste the code we are using
It is placed in a field of type field_varchar that has as a related term the element tch348 (Location (topographic))
The idea would be to publish a record from the tch1 section with, for example, the following value in the tch348 field:
Contenedor 18, Vitrina 4, Sala de reserva 2. Plaquetas Parpalló., Entresuelo, Museo de Prehistoria de Valencia, Topográfico
Show only:
Sala de reserva 2. Plaquetas Parpalló.
Which corresponds to the thesaurus element location1 that has the value Sala (location2_14) as type. However, as I mentioned, when publishing, null is always displayed.
The same thing happens to us with the tch555 field (Recovery place).
Looking back at the initial message, I may not be able to explain it well, since we don't actually publish from the tchi1 (immovables) section, but from the tch1 (objects) section. I don't know if this could have any influence.
Looking a little at the source code of Dedalo and some examples that we have found through the ontology we have tried this other code
This one does seem to iterate between the parents and stop when it should, but it doesn't show what we want. For the previous example:
Contenedor 18, Vitrina 4, Sala de reserva 2. Plaquetas Parpalló., Entresuelo, Museo de Prehistoria de Valencia, Topográfico
is showing
Contenedor 18, Vitrina 4
It does seem to stop at Sala de reserva 2. Plaquetas Parpalló. and shows the father, but what we would like to be shown is the element itself. It seems that we are close but there is still some adjustment needed to achieve it.
If you need any more information or for me to try to explain it a little better, don't hesitate to tell me.
Thanks