Customizing Item Summary View

204 views
Skip to first unread message

Sarah Butash

unread,
Jul 27, 2021, 10:10:24 AM7/27/21
to dspac...@googlegroups.com
Hello,

Just following up to see if anyone can give any advice....

I've been tasked with adding the dc.rights field to the item summary view in Dspace.  We are an xmlui environment.

I have added a line for this additional field to the messages.xml.

I have added a code block for template name itemSummaryView-DIM-rights to item-view.xsl, copying/modifying the code from another visible field (uri).  I've added a call-template statement for this code block as well.

I've bounced my tomcat service after the changes.

But, my rights field label and data do not show.  

Given this is a GUI change, I thought just bouncing tomcat would make the changes appear.  Does this require another step since it is a new field?

Any advice you can provide is appreciated.  Any pointers to documentation for this type of change would be welcomed as well.

Thank you!
Sarah


--

Sarah Butash

she / her

Library Systems Analyst, OU Libraries

Kresge Library, Room 227

100 Library Drive, Rochester, MI  48309-4479

Phone: 248-370-2368



Michael Plate

unread,
Jul 27, 2021, 10:21:55 AM7/27/21
to dspac...@googlegroups.com
Hi Sarah,



Am 27.07.21 um 16:10 schrieb Sarah Butash:
> Hello,
>
> Just following up to see if anyone can give any advice....
[…]

could you please share the template ?

CU

Michael

Sarah Butash

unread,
Jul 29, 2021, 7:48:11 AM7/29/21
to Michael Plate, dspac...@googlegroups.com
Thanks for your interest, Michael.  My template is below.  I mocked up this template from another template in the same file (item-view.xsl).  When I pull up the summary item view, I see no 'rights' field.  If I look at the source when running the app, I can see a value assigned to rights. I feel like the data is there, it's just not appearing on the page.  I'm not sure where else to update but the messages.xml and the item-view.xsl.  Because this is a new field, do I need to declare it somewhere else as well?  Would it require a recompile of DSpace versus just bouncing the tomcat server?  Any advice you can provide is appreciated.

 <xsl:template name="itemSummaryView-DIM-rights">
   <xsl:if test="dim.field[@element='rights' and not(@qualifier)]">
       <div class="simple-item-view-rights item-page-field-wrapper table">
          <h4><i18n:text>xmlui.dri2xhtml.METS-1.0.item-rights</i18n:text></h4>
          <hr class="visible-xs section-hr"/>
          <div>
              <xsl:for-each select="dim:field[@element='rights' and not(@qualifier)]">
                        <xsl:choose>
                            <xsl:when test="node()">
               <xsl:copy-of select="node()"/>
               </xsl:when>
                   <xsl:otherwise>
                  <xsl:text>&#160;</xsl:text>
               </xsl:otherwise>
                </xsl:choose>  
              <xsl:if test="count(following-sibling::dim:field[@element='rights' and not(@qualifier)]) != 0">
                  <div class="spacer">&#160;</div>
              </xsl:if>
              </xsl:for-each>
                   <xsl:if test="count(dim:field[@element='rights' and not(@qualifier)]) &gt; 1">
              <div class="spacer">&#160;</div>
              </xsl:if>
               </div>
           </div>
       </xsl:if>
    </xsl:template> 


--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/fdc67ced-0e66-1879-3020-53a853ed8a74%40bibliothek.uni-kassel.de.

Michael Plate

unread,
Jul 29, 2021, 8:15:54 AM7/29/21
to dspac...@googlegroups.com
Hi Sarah,

Am 29.07.21 um 13:47 schrieb Sarah Butash:
> <xsl:template name="itemSummaryView-DIM-rights">
>    <xsl:if test="dim.field[@element='rights' and not(@qualifier)]">

^^^^^^^^^^^^^^^^^^^^^^^^^^
there must be a colon ":", not a dot "." between "dim" and "field" :

<xsl:if test="dim:field[@element='rights' and not(@qualifier)]">


CU

Michael


Reply all
Reply to author
Forward
0 new messages