[daisy] Is there a way to have a dynamic page of included snipets?

Nick dos Remedios nick at cambia.org
Thu Nov 30 15:29:27 CST 2006


On 30/11/2006, at 11:22 PM, David Goodenough wrote:
> I want to have a news page, and I thought the easiest way to do  
> this would be
> to have a set of small documents which represented each news item,  
> and then
> do a Query+Include ordering by date and limiting the number.
>
> My first instinct was to put these new documents into a collection,  
> which
> I can use in the select inCollection( ) clause, but I am unsure how  
> I go
> about putting a document in a collection in the first place.
>
> Is this the best way, and if so is there any documentation as to  
> how to
> put a document in a collection(do I have to create the collection  
> first?).
> If not, can anyone suggest an alternative.

Another approach is to create a custom document type for the news  
"items". This has the advantage of allowing the doc type to have  
fields which can be used to sort the news items in the query+inlcude.  
The obvious field to have is a date field, then sort news items by  
most recent to oldest.



More information about the daisy mailing list