Re: [greenstone-users] Preferences default values (wasShowingmultiple...)

From Katherine Don
DateFri, 13 May 2005 09:07:50 +1200
Subject Re: [greenstone-users] Preferences default values (wasShowingmultiple...)
In-Reply-To (4282E76F-3060602-cs-waikato-ac-nz)
Hi Jonathan

If you really wanted different defaults for different collections, you
could do it by hard coding the home page - make static links to all the
collections, and include the extra args in the link
eg standard link is a=p&p=about&c=collname, then add on the other args,
eg l=fr&o=50.

Regards,
Katherine Don

Michael Dewsnip wrote:
> Hi Jonathan,
>
> Good question. This is easy to do for your whole library, but I don't
> know how to make it collection-specific.
>
> To set a default preference value for the whole library, edit
> etc/main.cfg, scroll down to the bottom and you'll see some already set:
>
> # set the default encoding to utf-8
> cgiarg shortname=w argdefault=utf-8
>
> So if you wanted the language (cgi argument "l" in the URL) to default
> to French:
>
> cgiarg shortname=l argdefault=fr
>
> or the number of hits per page to be 50:
>
> cgiarg shortname=o argdefault=50
>
> The easiest way to find out the cgi argument name for a particular
> option is to look at the Preferences page source and find the HTML code
> for displaying that option.
>
> All the best,
>
> Michael
>
>
>
> Jonathan Tremblay wrote:
>
>
>>Hi,
>>
>>Excellent Michael. It's a simple solution and it really does the job!
>>
>>Now something else...
>>
>>How can I change the preferences default values for my collection (The language, the number of results per page, etc.)
>>
>>Thanks again.
>>
>>Jonathan Tremblay
>>
>>----- Original Message -----
>>From: "Michael Dewsnip" <mdewsnip@cs.waikato.ac.nz>
>>To: "Jonathan Tremblay" <jonathan@piccolo.net>
>>Subject: Re: [greenstone-users] Showing metadata multiple values
>>Date: Wed, 04 May 2005 12:42:40 +1200
>>
>>
>>
>>
>>>Hi Jonathan,
>>>
>>>Unfortunately Greenstone doesn't have much functionality for dealing
>>>with multiple metadata values, and there is no built-in way for checking
>>>the number of values assigned to an element. (I've added this to the "to
>>>do" list for the future.)
>>>
>>>For your needs, however, you only care whether there is one value, or
>>>more than one value. If you get a little bit creative, this is quite
>>>possible with the existing functionality:
>>>
>>> {If}{[dc.Publisher] eq '[sibling:dc.Publisher]', There is only one
>>>publisher value!, There are multiple publisher values!}
>>>
>>>or in finished form:
>>>
>>> {If}{[dc.Publisher] eq '[sibling:dc.Publisher]', [dc.Publisher],
>>>[dc.Publisher] et al.}
>>>
>>>Hope this makes sense, and works for you,
>>>
>>>Regards,
>>>
>>>Michael
>>>
>>>
>>>
>>>Jonathan Tremblay wrote:
>>>
>>>
>>>
>>>
>>>>Thanks Katherine and Nathan, Your answers about the use of the sibling
>>>>modifier is (in some case) perfect
>>>>for what I want to do.
>>>>
>>>>But is there any way I can check if there is a second entry (I want to
>>>>modify the formatting, but I don't want to show the second entry)?
>>>>
>>>>I'd like to do something like:
>>>>{If}{[dc.Publisher],[dc.Publisher]}
>>>>{If}{[sibling(2):dc.Publisher], et all.}
>>>>
>>>>The result would be:
>>>>My title,
>>>>My First Publisher, et all.
>>>>
>>>>If there's no simple answer I'll live without it...
>>>>
>>>>Thanks,
>>>>Jonathan Tremblay
>>>>
>>>>-----Message d'origine-----
>>>>De : Nathan Einwechter [mailto:nathan@ontologystream.com] Envoy□ : 3 mai
>>>>2005 09:36
>>>>□ : 'Jonathan Tremblay'; greenstone-users@list.scms.waikato.ac.nz
>>>>Objet : RE: [greenstone-users] Showing metadata multiple values
>>>>
>>>>Not sure the exact context, but you could potentially use;
>>>>
>>>>[sibling:dc.Publisher-2]
>>>>
>>>>or
>>>>
>>>>[sibling(All:'<br>'):dc.Publisher-2]
>>>>
>>>>Where <br> is your html tag to separate each value. The first example
>>>>will separate each value by a comma.
>>>>
>>>>-- Nathan
>>>>
>>>>-----Message d'origine-----
>>>>De : Katherine Don [mailto:kjdon@cs.waikato.ac.nz] Envoy□ : 3 mai 2005 00:31
>>>>□ : Jonathan Tremblay
>>>>Cc : greenstone-users@list.scms.waikato.ac.nz
>>>>Objet : Re: [greenstone-users] Showing metadata multiple values
>>>>
>>>>Hi Jonathan
>>>>
>>>>Try using the sibling modifier eg
>>>>[sibling:Title]
>>>>this displays all Title metadata for the current section.
>>>>
>>>>see
>>>>http://www.greenstone.org/cgi-bin/library?e=p-en-faq-utfZz-8&a=p&p=faqcustom
>>>>ize#customizeformat
>>>>for more details about available format options.
>>>>
>>>>Regards,
>>>>Katherine
>>>>
>>>>-----Original Message-----
>>>>From: greenstone-users-bounces@list.scms.waikato.ac.nz
>>>>[mailto:greenstone-users-bounces@list.scms.waikato.ac.nz] On Behalf Of
>>>>Jonathan Tremblay
>>>>Sent: Tuesday, May 03, 2005 12:19 AM
>>>>To: greenstone-users@list.scms.waikato.ac.nz
>>>>Subject: [greenstone-users] Showing metadata multiple values
>>>>
>>>>Hi,
>>>>
>>>>I'm now using en to format my VList. It works perfectly!
>>>>
>>>>Now, I would like to know if it's possible to show multiple values for a
>>>>metadata element. For example, if a title has two publishers, can I show
>>>>both of them?
>>>>
>>>>Someting like: {If}{[dc.Publisher-2],[dc.Publisher-2]}}
>>>>
>>>>Thanks,
>>>>Jonathan Tremblay
>>>>
>>>>_______________________________________________
>>>>greenstone-users mailing list
>>>>greenstone-users@list.scms.waikato.ac.nz
>>>>https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>>>>
>>>>
>>>>_______________________________________________
>>>>greenstone-users mailing list
>>>>greenstone-users@list.scms.waikato.ac.nz
>>>>https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
>>_______________________________________________
>>greenstone-users mailing list
>>greenstone-users@list.scms.waikato.ac.nz
>>https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>>
>>
>>
>
>
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>