[greenstone-users] hyperlinking multiple subject headings

From Belanger, Arthur
DateFri Dec 3 03:53:29 2010
Subject [greenstone-users] hyperlinking multiple subject headings
In-Reply-To (4CF434EA-7070209-cs-waikato-ac-nz)
The javascript solution is pretty clever. I added it to one of my test collections (ver 2.81) and found a problem. It the metadata element has multiple words, Medical Students, the first search by clicking on the generated link works fine but the next document display contains extra "stuff" in the display of the metadata item,

students&h=ddc&t=0&b=0&k=1>Medical Students

and the link is also messed up,


This is because highlighting of search terms is on by default. It appears that even the terms in the cgisafe display of metadata are highlighted. I siolved this problem by adding &hl=0 to the javascript line that generates the link.

Would it possible in the next release to eliminate highlighting from cgisafe metadata display? That wouldn't totally solve this problem but it seems to me that if the purpose of cgisafe is to be able to pass the item to a cgi, then highlighting is neither required nor desirable.


Arthur Belanger
Medical Library System Manager
ITS Academic Media & Technology
Yale University
PO Box 208065
New Haven, CT 06520-8065

(203) 785-6928
(203) 785-5636, fax


NOTE: Yale ITS will NEVER request passwords or other personal information via email. Messages requesting such information are fraudulent and should be deleted.

From: greenstone-users-bounces@list.scms.waikato.ac.nz [mailto:greenstone-users-bounces@list.scms.waikato.ac.nz] On Behalf Of Katherine Don
Sent: Monday, November 29, 2010 6:19 PM
To: John Fitzgibbon
Cc: greenstone-users@list.scms.waikato.ac.nz
Subject: Re: [greenstone-users] hyperlinking multiple subject headings

Hi John

The following wiki page might be useful for you

Alternatively, if there will not be too many subjects for each item, you can do something like the following:

{If}{[sibling(1):dc.Subject],<a href=\"_httpquery_&h=xx&q=[sibling(1):dc.Subject]\">search on [sibling(1):dc.Subject]</a>}

where xx is the 2 letter code for the subjects index.
You can copy the line multiple times, using [sibling(2):dc.Subject] the second time and so on.

See also http://wiki.greenstone.org/wiki/index.php/How_to_format_the_output_of_your_collection


John Fitzgibbon wrote:

I have a collection of photographs. Each photograph has a number of subject headings which I have listed using Dublin Core. Usually, the 'Subject and Keywords' element is repeated. I am trying to display the list of subject headings near the photograph and make each subject heading a hyperlink to the results page of a subject search for that subject.

I have tried this but it is not linking to the right page and it is linking to all subjects combined rather than each subject individually.

Subject headings: [link][highlight][sibling(All', '):dc.Subject][/highlight][/link]

When I look at any given results page for a subject search I can see that its url ends with '&q=' followed by each word in the subject heading seperated by a '+' sign. How do I use this to build my link? How do I make each subject heading a link?

Any help would be much appreciated.


John Fitzgibbon

w: www.galwaylibrary.ie<http://www.galwaylibrary.ie>

e: info@galwaylibrary.ie<mailto:info@galwaylibrary.ie>

p: 00 353 91 562471

f: 00 353 91 565039


This e-mail message has been scanned for content and cleared by MailMarshal Hosted at Galway County Council
T□ an teachtaireacht r□omhphoist seo scan□ilte d'□bhar agus glanta ag MailMarshal at□ □st□lta i gComhairle Chontae na Gaillimhe.

Correspondance is welcome in Irish or in English.

T□ m□le f□ilte roimh chomhfhreagras i nGaeilge n□ i mB□arla.

T□ eolas at□ pr□obh□ideach agus r□nda sa r□omhphost seo agus aon iat□n a ghabhann leis agus is leis an duine/na daoine sin amh□in a bhfuil siad seolta chucu a bhaineann siad. Mura seola□ th□, n□l t□ □daraithe an r□omhphost n□ aon iat□n a ghabhann leis a l□amh, a ch□ip□il n□ a □s□id. M□ t□ an r□omhphost seo faighte agat tr□ dhearmad, cuir an seolt□ir ar an eolas thr□ aischur r□omhphoist agus scrios ansin □ le do thoil.

This e-mail and any attachment contains information which is private and confidential and is intended for the addressee only. If you are not an addressee, you are not authorised to read, copy or use the e-mail or any attachment. If you have received this e-mail in error, please notify the sender by return e-mail and then destroy it.

If you need this email in an alternative format please contact the sender

M□ t□ an r□omhphost seo ag teast□il uait i bhform□id eile d□an teagmh□il leis an duine a sheol chugat □




greenstone-users mailing list



-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://list.scms.waikato.ac.nz/mailman/private/greenstone-users/attachments/20101202/ef2150d0/attachment-0001.html