diff --git a/README.md b/README.md index 40f901c..4880edb 100644 --- a/README.md +++ b/README.md @@ -49,19 +49,77 @@ Build the JAR file with `mvn clean install` and copy it to `~/.mycore/(dev-)mir/ ### Configure `mycore.properties` +#### Enable navigation on object pages in frontend + To use the plugin, configuration in `~/.mycore/(dev-)mir/mycore.properties` is required. The RSS feed requires a `mycoreobject-rss` stylesheet, which is not included by default. For historical reasons, the link to the RSS feed is always displayed, but it can be disabled if needed. All in all, configure as follows: ```text -# Add 'series-banner' and 'series-layout'. -MIR.Layout.End=mir-edit,series-banner,series-layout,mir-citation,mir-thumbnail,mir-epusta,mir-access-rights,mir-export,mir-admindata,mir-historydata +# Add 'series-layout'. +MIR.Layout.End=mir-edit,series-layout,mir-citation,mir-thumbnail,mir-epusta,mir-access-rights,mir-export,mir-admindata,mir-historydata # Optional: disable RSS feed. MIR.Metadata.Navigation.SeriesPanel.RSS.Enabled=false ``` +#### MyCoReWebPage support + +The panel can optionally be rendered within a +[MyCoReWebPage](https://www.mycore.de/documentation/frontend/frontend_static_content/). +To enable this, the stylesheet `series-panel-adapter.xsl` is provided. +The panel can be embedded using a `` element in your MyCoReWebPage. +When embedding, pay attention to the layout to ensure the panel is formatted correctly. + +> ⚠️ Note: The parameters `MCRObjectID` and `MCRDerivateID` must be present in the transformer session to resolve the +> navigation. + +To activate it, add the stylesheet as follows: + +```text +# Add 'series-panel-adapter.xsl' to enable series panel rendering in MyCoReWebPage. +MCR.URIResolver.xslIncludes.MyCoReWebPage=%MCR.URIResolver.xslIncludes.MyCoReWebPage%,series-panel-adapter.xsl +``` + +Example MyCoReWebPage with panel and layout: + +```xml + +
+
+
+

Hello world

+
+
+ +
+
+
+
+``` + +#### Extended MyCoReWebPage support + +MyCoReWebPage support can be extended with `series-panel-enricher.xsl`. By setting `render-series-panel="true"` in a +MyCoReWebPage, a series panel with layout is automatically generated, using the section’s content. +To activate it, add the stylesheet alongside `series-panel-adapter.xsl` as follows: + +```text +# Add 'series-panel-enricher.xsl' to enable extended series panel rendering in MyCoReWebPage. +MCR.URIResolver.xslIncludes.MyCoReWebPage=%MCR.URIResolver.xslIncludes.MyCoReWebPage%,series-panel-enricher.xsl,series-panel-adapter.xsl +``` + +Example MyCoReWebPage with automatic panel and layout using `render-series-panel`: + +```xml + +
+

Hello world

+
+
+``` + ### Reload and rebuild Solr The plugin leverages enhanced Solr handling for parent documents. diff --git a/src/main/resources/xsl/navigation-flatmir-layout.xsl b/src/main/resources/xsl/navigation-flatmir-layout.xsl index 759e8e3..1f1e639 100644 --- a/src/main/resources/xsl/navigation-flatmir-layout.xsl +++ b/src/main/resources/xsl/navigation-flatmir-layout.xsl @@ -1,12 +1,7 @@ - - - - + - + @@ -15,24 +10,21 @@ -
-
- - - + + + +
-
-
\ No newline at end of file +
diff --git a/src/main/resources/xsl/render-series-panel.xsl b/src/main/resources/xsl/render-series-panel.xsl new file mode 100644 index 0000000..f45b08b --- /dev/null +++ b/src/main/resources/xsl/render-series-panel.xsl @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+

+ +

+
+
+
    + + + + + + + + + + +
+
+ +
+
+
+ + + +
  • + + + + + + + + + + + + +
  • +
    + + + + + + + +
  • + + + RSS 2.0 Feed + +
  • +
    +
    diff --git a/src/main/resources/xsl/series-panel-adapter.xsl b/src/main/resources/xsl/series-panel-adapter.xsl new file mode 100644 index 0000000..85c3836 --- /dev/null +++ b/src/main/resources/xsl/series-panel-adapter.xsl @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/xsl/series-panel-enricher.xsl b/src/main/resources/xsl/series-panel-enricher.xsl new file mode 100644 index 0000000..38143a9 --- /dev/null +++ b/src/main/resources/xsl/series-panel-enricher.xsl @@ -0,0 +1,26 @@ + + + + + +
    +
    + +
    +
    + +
    +
    +
    + +
    + + + +
    +
    + +
    diff --git a/src/main/resources/xsl/series-panel.xsl b/src/main/resources/xsl/series-panel.xsl index 42aa5c3..6fe1c08 100644 --- a/src/main/resources/xsl/series-panel.xsl +++ b/src/main/resources/xsl/series-panel.xsl @@ -1,119 +1,25 @@ - - - - - - - + exclude-result-prefixes="xlink"> + + + - + - - - - - - - - -
    - - - - - -
    -
    -

    - -

    -
    - -
    -
      - - - - - - -
    -
    - - - -
    -
    -
    - - - - -
  • - - - -
  • -
    - -
  • - - - -
  • -
    -
    -
    - - - - - - - - -
  • - - - RSS 2.0 Feed - -
  • -
    -