Re: [greenstone-users] To display Author, Title, Publisher and description details while viewing the document

From Kuan-Yu(Jeffrey) Ke
DateFri, 27 Apr 2007 04:22:28 -0000
Subject Re: [greenstone-users] To display Author, Title, Publisher and description details while viewing the document
In-Reply-To (caa538920704260320g52d1511v5059e3c5f7bea871-mail-gmail-com)
Hi Ponerulappan,

Firstly, I believe there is no easy to display ALL metadata in the standard Greenstone, however, there are several ways to add metadata display to the your collection.
The easiest way would be editing the under [GSDLHOME]/collect/[yourcollection]/etc/collect.cfg

Following, I will use the demo collection as an example (the demo collection should come with every Greenstone installation, if it doesn't, let me know, I will send you one).
In the collect.cfg, we use format statement to customize the metadata display. Different format statement control different part of system.
For example:
format SearchVList <- this controls how the search result list should look like.
format VList <- this controls all the vertical document list, such as browse by Title or browse by Subject, etc...
You can use the demo collection to do some testing. Change the format statement and reload the page, you should see the changes.

This is the original format statement in the demo collection:
format VList "<td valign=top>[link][icon][/link]</td> <td valign=top>[highlight]{Or}{[Title],Untitled}[/highlight]
<i><small>{If}{[Date],<br>publication date: [Date]}{If}{[NumPages],<br>no. of pages: [NumPages]}{If}{[Source], <br>source ref: [Source]}</small></i></td>"

If you want to display Title, Author, Publisher, you can change it to:
format VList "<td valign=top>[link][icon][/link]</td><td valign=top> [highlight]{Or}{[Title], Untitled}[/highlight] {Or}{[Author], No Author Available} {Or}{[Publisher], No Publisher Available} <i><small> {If}{[Date], <br>publication date: [Date]}{If}{[NumPages], <br>no. of pages: [NumPages]}{If}{[Source],<br>source ref: [Source]}</small></i></td>"
What the new code will do is:
If the document has Title metadata, displays it, otherwise display Untitled

If the document has Author metadata, displays it, otherwise display
No Author Available
If the document has Publisher metadata, displays it, otherwise display
No Publisher Available

You can apply same technique to the other metadata fields, as long as you are sure they exist.
There are no easy way to tell what metadata has been extracted, the only one way I can suggest to you is to look at the archive folder.
Go to
[GSDLHOME]/collect/[yourcollection]/archives, enter anyone of the directory and open the doc.xml.
In there, you will see something like <Metadata name="Source">********</Metadata>. This means for this document, the Source metadata is extracted.
Find out whether the metadata you with to display existing or not, and use [Metadata_Name] in the format statement in your collect.cfg.

Hope this would help,

Ponerulappan wrote:
Dear Folks

It gives much pleasure to have so many Q & A on GSDL  and it's usage
also been incresing all around. it would definitely boost the sponsor
to do more.

I would like to clarify some doubts.

1. When veiwing the collection it doesn't show all metadata taht
provide during collection Buildig.  how we could display all metadata

To display Author, Title, Publisher and description details while
viewing the document

(Note: we are using browse option to browse the collection using other
metadata Author, Title, Topic etc But when click on the particular
Title it doesn't show that.

Now it shows like
         image icon and Title            Banking and Finance in Switzerland
         file Name                       (swissbank.pdf)

But i like to have Title, Author, Publisher , Pages description etc...

How it's possible to show all metadata to readers.hope everybody wants
to have  the same ...

Your help would be highly appreciate.