[Dspace-general] Change the item preview
Stuart Lewis
s.lewis at auckland.ac.nz
Tue Oct 6 17:08:38 EDT 2009
Hi Héctor,
> I want to change the full metadata view of an item. Looking into the
> files the org.dspace.app.webui.servlet.HandleServlet servlet calls
> /display-item.jsp file to show an item.
> Looking this file I think that the command that shows the full
> metadata
> view is:
>
> <dspace:item-preview item="<%= item %>" />
> <dspace:item item="<%= item %>" collections="<%= collections %>"
> style="<%= displayStyle %>" />
>
> In the full view there are three columns: the first one is the dc
> field,
> the second is the value and the third is the language. I want to
> remove
> this third column, but I don't know how remove it. I think it could be
> related with those previous <dspace> directives, but I don't know
> how it
> works. Can anybody help me to remove the language column?
When tags begin with '<dspace:' it means that they are part of the
DSpace tag library. You can match up the name (e.g. 'item') with the
relevant class by looking in [dspace-src]/dspace-jpui/dspace-jspui-
webapp/src/main/webapp/WEB-INF/dspace-tags.tld
You should see this:
<tag>
<name>item</name>
<tagclass>org.dspace.app.webui.jsptag.ItemTag</tagclass>
<info>
Tag for displaying an item. "item" must always be an
org.dspace.content.Item. "style" should be "default" or
"full", or can
be omitted to use "default". "collections" should be the array
of
collections the item is in, worked out beforehand to avoid the
chance
of an error occurring during display. If collections is null,
the
collections the item is in aren't listed.
</info>
<attribute>
<name>item</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>style</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>collections</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
So you'll need to look in the Java class [dspace-src]/dspace-jspui/
dspace-jspui-api/src/main/java/org/dspace/app/webui/jsptag/ItemTag.java
Look for the renderFull() method, and edit as required.
I hope this helps,
Stuart Lewis
IT Innovations Analyst and Developer
Te Tumu Herenga The University of Auckland Library
Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand
Ph: 64 9 373-7599 x81928
http://www.library.auckland.ac.nz/
P.S. - you may get quicker answers to technical questions if they are
posted to the dspace-tech email list (https://lists.sourceforge.net/lists/listinfo/dspace-tech
)
More information about the Dspace-general
mailing list