[greenstone_es] Re: [greenstone_es] boton de próximo resultado dentro de una lista
- From: Diego Spano <diegospano@xxxxxxxxx>
- To: greenstone_es@xxxxxxxxxxxxx
- Date: Tue, 17 Nov 2009 12:51:41 -0300
Nicolás, algo parecido se publicó en la lista en inglés. Te lo transcribo y
quizas te sirva de base para algo de lo que querés hacer.
************** pregunta original ***************
> When using a browsing classifier, AZCompactList in my case, a format
statement such as [link][Title][/link] ([numleafdocs]) produces something
like the following:
>
> Apple (3)
> Arugula (5)
> Asparagus (1)
>
> Apple, Arugula and Asparagus are links which open a bookshelf (classifier
node) containing the documents. When licking Apple, he same format
statement produces something like:
>
> Apple (3)
> Apple Pie and Ice Cream ()
> How to make Apple Cider ()
> Varieties of Apples and Their Uses ()
>
> The last 3 lines are links to the actual documents. The empty parentheses
indicate that there are no nodes below the document, that is [numleafdocs]
does not exist.
>
> The Apple line is a link back to the list, closing the bookshelf. So, the
Greenstone server "knows" when to generate the "close bookshelf" link. I
would like to be able to detect this myself so I can change the [Title] to
something like "Back to Subject list". An {if} statement in my format would
look something like this:
>
> {If}{_test-for-closing-bookshelf_,[link]Back to Subject
> List[/link],[link][title][/link]
>
> Producing:
>
> Back to Subject List
> Apple Pie and Ice Cream
> How to make Apple Cider
> Varieties of Apples and Their Uses
>
> Is there such a test available via a macro or system generated piece of
metadata (like [numleafdocs]) that I can use for the test?
*************************** Respuesta *********************************
After a bit of fiddling, I came up with the following:
If you only have two levels, then you can use something like the following
in CLXVlist format statement:
_If_(\"_cgiargcl_\" eq \"[DocOID]\",close this section,[Title])
If you have more than two, this will give
* section title
** close this section
*** book title
*** book title
*** book title
To get close this section for both the open bookshelves, use
_If_(\"_cgiargcl_\" sw \"[DocOID]\",close this section,[Title])
sw == starts with
This doesn't distinguish between the first and second open bookshelves.
If you wanted to do that, probably using javascript to count the '.' in
_cgiargcl_ (the current open classifier node) and [DocOID] - the oid of the
doc/bookshelf to link to, and compare them would work.
2009/11/13 Nicolás Rucks <nrucks@xxxxxxxxxxxxx>
> Hola gente,
>
> cuando uno hace una BÚSQUEDA, y recupera una serie de resultados, en
> primera instancia se ve una lista vertical, y en segunda instancia, un puede
> elegir un documento específico y verlo.
> A partir de ahí existe un parámetro, que yo dejé habilitado, para que se
> muestren los botones de "resultado previo de la búsqueda", y "próximo
> resultado de la búsqueda", para ir pasando los documentos recuperados, de a
> uno.
> (format DocumentSearchResultLinks true)
>
> Existe un parámetro similar que se aplique a la LISTAS predefinidas (por
> ejemplo un "classify AZList [...]" de título o de autor)?
>
> Cosa de que a partir de ese listado, también, además de poder ver un
> listado de ítems, cuando elijo uno ítem específico, luego pueda pasar al
> siguiente, sin tener que volver a la lista.
>
> Desde ya muchas gracias.
>
> Nicolas Rucks
> Biblioteca Cardini
> Fundación Instituto Leloir
>
>
Other related posts:
- » [greenstone_es] Re: [greenstone_es] boton de próximo resultado dentro de una lista - Diego Spano