Below is the original reply to your first email.
Changing the search form is easy if you are not introducing any dynamic
elements. Currently I can't think of any way to dynamically generate a
list of all metadata values for a particular element.
But if you just want to add a static list then thats fine.
If you want to make changes for your whole site, then you can modify the
macro files in gsdl/macros. If you only want to change things for one
collection, then create a macro file called extra.dm and put it in
In extra.dm you can override any of the macros in the standard macro
files. You need the package name first, then the macro definition.
Have a look at query.dm to see the query form. It is made up of many
macros as there are different configurations depending on what type of
collection it is. And all the text strings are in separate macros too.
As Stephen said below, you will need to rebuild your collection using
advanced searching so that you can do field based searching.
There is no guide to the syntax - you just need to look at the source
code of, and urls generated by, the form search pages.
eg, to search for snail in Title, and Africa in Country, you will need
both Title and County in the index.
And the query url would include
TI and CO are the codes that the metadata gets indexed as - look in
gsdl/collect/collname/index/build.cfg for actual values.
Hope this helps,
Stephen DeGabrielle wrote:
> Hi John,
> Caveat - I haven't actually done this with Greenstone - but I have
> done it a lot with other systems.
> You need to make a custom 'macro' file for your collection, or you
> could customise the existing macro files.
> To do what you are suggesting you need to select (in the GLI) advanced
> searching and
> 'form' based searching - when you rebuild the collection it will be
> able to search across multiple metadata 'fields'.
> After that you can view source on the search page to see how
> greenstone constructs searches -
> Once you get a handle on how greenstone constructs search for you
> specific collection you can embed any custom form elements you like
> into a custom macro document for the collection - includion dropdown
> lists, radio buttons and checkboxes.
> Note: the 'Garish' demo collection is a good intro into custom macro files.
> You may also want to investigate 'partition indexes' in the
> GLI/Developers Guide, as this may also be of interest.
> Sorry I have not been able to give you a more detailed answer - its
> late and I am going to bed soon.
> Do let me(and the list) know if you need more information/help or if I
> haven't been clear enough to get you started.
> On Mon, 14 Mar 2005 18:07:32 -0800, John Lubotsky <firstname.lastname@example.org> wrote:
>>I'm a Greenstone newbie, designing a collection on OS X using v 2.52.
>>We want to enable users to choose a search string from a pulldown menu (a
>><SELECT> tag), drawing the <OPTION> values ideally from a metadata field, or
>>else staticly embedded in the code.
>>Some example HTML to illustrate the idea is below. In the below example, the
>>text input would search ex.Title, and the option values would come from
>>Search for documents containing the words
>><input type=text size=25> that pertain to
>> <option value=north_america>North America
>> <option value=south_america>South America
>> <option value=africa>Africa
>> <option value=europe>Europe
>> <option value=asia>Asia
>> <option value=australia>Australia
>>I've searched the documentation but i'm stumped. Is this possible? How do we
>>Thanks and Best,
>>PS: I'm also interested in more generally being able to use checkboxes,
>>radio buttons, and other form elements. -j-
> greenstone-users mailing list