Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Currently, a TOC level (in toc-layouts.xml) defines a field (level/@field) that is used to create a SOLR search facet. The facet information in the SOLR response is then used to render the corresponding TOC level in HTML.
While doing so, the corresponding value of the search facet is used as a display label for the TOC item.
Also, all entries at the same level are ordered (by SOLR) using this value.
This is okay for fields with a natural order (e.g. mods.yearIssued). But there are scenarios where this is not the case, say if a publication has many children and a section level should be used to organize the children (e.g. my.toc.section.number with values 1,2, ... for sorting and my.toc.section with values Foo, Bar, ... as display values). Example:
I’d be happy to expand the documentation for the TOC mechanism, but I don’t think it exists yet (and I’m unwilling to create it as part of this ticket).
Torsten Krause
April 25, 2023 at 12:49 PM
No, the SOLR-fields my.toc.section.number and my.toc.section , the way the these fields are populated and the corresponding TOC layout are just an example. This ticket just adds the displayField-attribute to the set of possible attributes, which then may be used with any SOLR field (standard or custom).
Kathleen Neumann
April 25, 2023 at 12:10 PM
Can we add a short documentation here? If I see it right, we need to add mir.toc.section and mir.toc.section.number as searchfield in my solr schema and config, right? And the above mentioned xml in my toc-layouts.xml
Currently, a TOC level (in
toc-layouts.xml
) defines a field (level/@field
) that is used to create a SOLR search facet. The facet information in the SOLR response is then used to render the corresponding TOC level in HTML.While doing so, the corresponding value of the search facet is used as a display label for the TOC item.
Also, all entries at the same level are ordered (by SOLR) using this value.
This is okay for fields with a natural order (e.g.
mods.yearIssued
). But there are scenarios where this is not the case, say if a publication has many children and a section level should be used to organize the children (e.g.my.toc.section.number
with values1,
2
, ... for sorting andmy.toc.section
with valuesFoo
,Bar
, ... as display values). Example:A corresponding TOC layout might be:
<toc-layout id="publication-sections" field="mir.toc.ancestor"> <label>Modell 0, Ebene 1: Publikation (mit Sektionen)</label> <level field="my.toc.section.number" displayField="my.toc.section" order="asc" expanded="first"> <publications> <sortBy field="mir.toc.host.page.int" order="asc" /> <sortBy field="mir.toc.host.page.str" order="asc" /> </publications> </level> </toc-layout>