Re: Using internal links

From John R. McPherson
DateThu, 21 Mar 2002 11:20:59 +1200
Subject Re: Using internal links
In-Reply-To (C08FFFF817C9D2118C7C00A0C9ED1155019856AD-EXCHANGE)
Pam Osborne wrote:
> We have created seven Greenstone collections. Some of our pages are designed
> to refer a searcher from one document to a document in one of the other
> collections, i.e. an internal link. The problem we are having is that when
> we try to create an internal link in the format of:
> href="./gsdl/cgi-bin/library?a=q&r=1&hs=1&e=p-000-00---0pubinfo--00-0-0-0pro
> mpt-14-Document---0-1l--1-en-50---20-about---001-001-1-0isoZz-8859Zz-1-0&h=d
> tt&t=0&q=bio"
> Greenstone reformats it to:
> href="http:%2f%2fgsdl%2fcgi-bin%2flibrary%3fa%3dq%26r%3d1%26hs%3d1%26e%3dp-0
> 00-00---0pubinfo--00-0-0-0prompt-14-Document---0-1l--1-en-50---20-about---00
> 1-001-1-0isoZz-8859Zz-1-0%26h%3ddtt%26t%3d0%26q%3dbio"

in your collect.cfg file, add an option to HTMLPlug so that it does
no processing of links:

plugin HTMLPlug -nolinks

The default is for greenstone to redirect links so that users are aware
that they are leaving the library site.

Also, instead of hard-coding the user preferences in the
URL, you can use macros that will use the current set of preferences
so that users won't lose any changes:

<a href="_gwcgi_?e=_compressedoptions_&h=dtt&t=0&q=bio">

_gwcgi_ is a macro for the cgi/library script name, although I
would assume that it shouldn't change, so you could hard-code this as

If you wanted the link to go to another collection, you might need
to a the "&c=<collectname>" option to that url as well.

John McPherson