From | Kuan-Yu(Jeffrey) Ke |
Date | Wed, 02 May 2007 09:32:44 +1200 |
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]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, Cheers, Jeffrey Ponerulappan wrote: Dear Folks |