Dears,
I have to add an external link to my item page, I'm trying to do it on
the ItemViewer.java, with the code below, I'm not sure if it is the best
way to do it, even more, I'm problem to add a single css class on it, I
already division.addPara addDiv and I didn't get a good results.
externalLinks.addSimpleHTMLFragment(false, "<a href=\"" + value + "\">
External Link <\\a>");
Here is a complete version of my method, I'm calling from the method
addBody.
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 + "\"> External Link <\\a>");
}
}
}
Thanks
Luiz
--
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.