Hi euler, Am 21.01.24 um 23:42 schrieb euler:
Dear All,I would like to ask how can I add a string to a ds-item-page-uri-field?
You have multiple opportunities:doing it directly in the template, but this is sort of limited; I don't have an example that directly fits your problem, but you can do it like this
<ng-container *ngIf="object.metadata['dc.contributor.editor']"> <h2>{{'relationships.isEditorOf' | translate}}</h2><div style="word-break: break-word;display: inline-block;" *ngFor="let authors of object.metadata['dc.contributor.editor']| keyvalue">
<a href="/browse/author?value={{authors.value.value}}" style="border:1px solid #f0f0f0;border-radius:4px;background-color:#f0f0f0;margin:2px;display: inline-block;">{{ authors.value.value}}</a>
</div> </ng-container>This was as a test before writing a component, it checks for the existence of 'dc.contributor.editor' in the metadata (object.metadata) and renders this in a loop as an ULR…this is just an idea of how to achieve that.
The better possibility is writing an own component (https://wiki.lyrasis.org/display/DSPACE/DSpace+7+-+Angular+UI+Development) in a theme or changing the base theme; you will find ./src/app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component.[ts|html] just to see it uses another component 'ds-metadata-uri-values' - but in the *ts you can extend the metadatavalue with 'http…', maybe.
I noticed that this will only work if the field is a URL. I'm trying to display the DOI of the item in the simple item page but all of our existing DOIs doesn't have the "https://doi.org/" which is what we really want because we will be using it later as value for altmetrics, dimensions or plumx.
We save all our PIs with its namespace, doi:, urn:nbn: e.g., so you thankfully remind me to look at it :) .
Michael -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/ff26c010-989f-4e82-896a-fe870f8028ee%40bibliothek.uni-kassel.de.
smime.p7s
Description: Kryptografische S/MIME-Signatur