Re: [greenstone-users] Format question and little bugs?

From Katherine Don
DateThu, 09 Mar 2006 10:26:04 +1300
Subject Re: [greenstone-users] Format question and little bugs?
In-Reply-To (440DD1C3-8060909-inwind-it)
Hi Ruben

Answers below. (actually mostly non-answers :-( )

Regards,
Katherine

ruben pandolfi wrote:
> Hi All,
>
> I have these little questions about formatting, I can not get it work
> ...
>
> 1) In collect cfg I have:
>
> .............................
>
> classify GenericList -sort_leaf_nodes_using dc.Title
> -always_bookshelf_last_level -metadata dc.Language
>
>
> and
>
> format DocumentText" ....
>
> {If}{[dc.Language], <tr><td valign=top><b>_Language_:</b></td><td
> valign=top>[dc.Language]</td></tr>}
>
> ...
> .............................
>
> the browsing list is fine and perfect, but for some reason the entire
> line in [dc.Language] for DocumentText is not displayed. All other
> fields are ok.. any idea what causes this problem?
>
>
No idea sorry. I copied the format statement into one of my collections
and it worked fine.
You could check your database to make sure that dc.Language is being stored.
in the greenstone directory, run
source setup.bash
db2txt collect/babel3/index/text/babel3.ldb | less
and search for dc.Language

> 2) In collect cfg I have:
>
> {If}{[Text] ne 'This document has no text. ',[Text]}
>
> But still the sentence appears for documents with no text
>
> (I have tried with other flavours, cna you confirm that the perl
> expression is working in this gsdl version?)
>
Again, this works for me. I copied the above text into my config file.
If you can't get it to work, you could modify the perl building code and
change the text that gets added if there is no text. Try adding nothing
(not sure if this will cause problems anywhere else though) or something
like NOTEXT, and try a test
{If}{[Text] ne 'NOTEXT',[Text]} or
{If}{[Text] ne NOTEXT,[Text]} or

>
> 3) How can I translate the text for a button name like this:
>
> classify AZCompactList -metadata dc.Title -firstvalueonly
> -buttonname Titles
>
>

In this case, you probably want to redefine the Titles macros in
english.dm, french.dm... to be 'titles' instead of 'titles a-z'. (and
then you don't need the buttonname argument).

If you were doing a new metadata name, e.g. Books, you'd need to add
_tabtextBooks_ {_labelBooks_}
into base.dm, then add the following into the various language macro files:
_labelBooks_ {books}
_textdescrBooks_ {Browse by books}
(the button label and the tooltip)