Kia ora, Ah, got it! No, I don’t think there’s a list of blocks for copy/pasting, because the code depends on what you want to display and when you want to display it.
For example, the item type block you paste you first has the i18n label (in English, probably this will display “Type” in bold) then for each dc.type listed, it just prints that out. You can do something simple like this if you know that every item will have one and only one dc.type. The authors row is more complex because there might be multiple authors so if there’s more than one you’ll want to put a comma or semi-colon in between them. So you’d want to think about which existing block behaves the most like your new field – then copy that and tweak it to suit (including the clause number). Deborah From: [email protected] <[email protected]> On Behalf Of Lolekbolek Sent: Tuesday, 18 August 2020 7:08 AM To: DSpace Technical Support <[email protected]> Subject: Re: [dspace-tech] How to properly add fields to short item view? Kia ora back to you, Deborah! Thank you for your reply. I understand now that xsl changes will take effect immediately. As to the fields, I have not properly formulate my question. I see the fields in Registries > Metadata, but what I would love to find is a list of xsl blocks that I could copy/paste into item-view.xsl. Right now it has 5 rows, each with a different number of lines: <!-- Author(s) row --> (42 lines) <!-- identifier.uri row --> (22 lines) <!-- date.issued row --> (17 lines) <!-- Abstract row --> (30 lines) <!-- Description row --> (23 lines) If I want to add a Publisher row or a Rights row, is there a place where I could find corresponding blocks for inclusion in item-view.xsl, or should I come edit one of the abovementioned blocks by adding/removing lines? On Sunday, August 16, 2020 at 7:09:25 p.m. UTC-3 [email protected]<mailto:[email protected]> wrote: Kia ora, 1. The fields depend on what fields you’re using in your DSpace. You can see the list by logging into the web interface as administrator, then in the menu look under Registries > Metadata. 2. You don’t need to restart the server after any xsl changes – they take effect immediately. Deborah From: [email protected] <[email protected]> On Behalf Of Lolekbolek Sent: Thursday, 13 August 2020 3:41 AM To: DSpace Technical Support <[email protected]> Subject: [dspace-tech] How to properly add fields to short item view? Greetings, I want to add a few fields to the short item view. For this, I need to edit an item-view.xsl file for the Mirage theme on DSpace 4. I read this message in an old thread: https://groups.google.com/g/dspace-tech/c/MrhvIwcb2FU/m/1pY5_QS4EAAJ<https://groups.google.com/g/dspace-tech/c/MrhvIwcb2FU/m/1pY5_QS4EAAJ> that suggests adding blocks like this, taking care of incrementing the $clause parameter with each addition: <xsl:when test="$clause = 5 and (dim:field[@element='type' and not(@qualifier) and descendant::text()])"> <div class="simple-item-view-type"> <span class="bold"><i18n:text>xmlui.dri2xhtml.METS-1.0.item-type</i18n:text>:</span> <span> <xsl:for-each select="dim:field[@element='type' and not(@qualifier)]"> <xsl:copy-of select="./node()"/> </xsl:for-each> </span> </div> <xsl:call-template name="itemSummaryView-DIM-fields"> <xsl:with-param name="clause" select="($clause + 1)"/> <xsl:with-param name="phase" select="$otherPhase"/> </xsl:call-template> </xsl:when> Two questions I have: 1. Is there a document somewhere online that would list the names of various fields so I could copy/paste them into my item-view.xsl? 2. After adding fields in item-view.xsl, do I need to restart the server or are there other things required for the changes to start displaying? -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/<https://duraspace.org/about/policies/code-of-conduct/> --- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/28ed4562-4894-4063-a145-52962ba75d80n%40googlegroups.com<https://groups.google.com/d/msgid/dspace-tech/28ed4562-4894-4063-a145-52962ba75d80n%40googlegroups.com?utm_medium=email&utm_source=footer>. ________________________________ "The contents of this e-mail (including any attachments) may be confidential and/or subject to copyright. Any unauthorised use, distribution, or copying of the contents is expressly prohibited. If you have received this e-mail in error, please advise the sender by return e-mail or telephone and then delete this e-mail together with all attachments from your system." -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/<https://duraspace.org/about/policies/code-of-conduct/> --- 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 [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/98594844-49e4-40f1-918e-1d092e994613n%40googlegroups.com<https://groups.google.com/d/msgid/dspace-tech/98594844-49e4-40f1-918e-1d092e994613n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/ME2PR01MB47720B7E77D29D0F192C786FC55F0%40ME2PR01MB4772.ausprd01.prod.outlook.com.
