Hi,
Our repository have two kind of url in the
dc.relation.externalresourse, internal and external url, so I add the
method below in the class
org.dspace.app.xmlui.aspect.artifactbrowser.ItemViewer.java,
in module folder. I'm calling the method in the addBody. The problem is
that I would like to add html to the item page, so I add the code that "
externalLinks.addSimpleHTMLFragment(false, "<a href=\"" + value + "\" class=
\"extternal-link\"> External Link <\\a>");" but it is printing the string
as a literal in item page html, I mean, the browser is not render the html
code. My question, how can I add something in the html using a aspect
class.
Thanks in advance
Luiz
private void addExternalItems(Division division, Item item) throws
WingException {
DCValue[] related = item.getMetadata("dc", "relation",
"externalresource", Item.ANY);
ArrayList<String> links = new ArrayList<String>();
for(DCValue dcValue: related ){
if(!isInternal(dcValue.value)) {
links.add(dcValue.value);
}
}
if(!links.isEmpty()) {
Division externalLinks = division.addDivision("externalLinks");
for(String value: links) {
externalLinks.addSimpleHTMLFragment(false, "<a href=\"" +
value + "\" class=\"extternal-link\"> External Link <\\a>");
}
}
}
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.