[daisy] Hierarchical document structure visible in navigation tree

Bruno Dumon bruno at outerthought.org
Mon Jan 7 09:16:26 CST 2008


On Mon, 2008-01-07 at 15:23 +0100, ccmail wrote:
> Bruno Dumon wrote: 
> > On Mon, 2007-12-17 at 15:53 +0100, ccmail wrote:
> >   
> > > ccmail wrote:
> > >     
> > > > ccmail wrote:
> > > >       
> > > > > Hi all,
> > > > > 
> > > > > Is this possible to create hierarchical tree of documents visible 
> > > > > automatically in the navigation tree of daisy wiki? If so - how can I 
> > > > > achieve this? I suspect that if it's possible then via hierarchical 
> > > > > link field - but this field type is not described (or I didn't manage 
> > > > > to find it) anywhere. I tried to create a field with following params:
> > > > > name: MyField
> > > > > type: link
> > > > > hierarchical: true
> > > > > selection list :query based parent-linked
> > > > > link field: MyField
> > > > > 
> > > > > and then add such a field to MyDocument
> > > > > 
> > > > > unfortunately it causes exception when trying to access "fields" tab 
> > > > > while creating new instance of MyDocument...
> > > > > 
> > > > > So my question could be rephrased as:
> > > > > if navigation tree can be made to display automatically (via query 
> > > > > node in the tree?) hierarchical set of documents based on hierarchic 
> > > > > link field of a document then how should I set it up to work instead 
> > > > > of throwing exceptions at me?
> > > > >         
> > > > .....
> > > entries. The problem is that query embedded in the navigational tree is 
> > > not showing proper tree if I insert query like:
> > > 
> > > SELECT $MyLinkField, name WHERE documentType = 'MyLinkedDocument'
> > > 
> > > So - is there a way to create such a tree without hard-coding tree 
> > > structure neither in navigation descriptor nor static list of values of 
> > > some custom hierarchical string-based categorizing field?
> > > 
> > >     
> > 
> > Yes, simply select the hierarchical field in the navigation tree query,
> > for example:
> > 
> > select $MyField, name where documentType = 'MyDocument'
> > 
> > If I understand your example correctly, in your query you are selecting
> > the documents which define the hierarchical tree, and not the documents
> > which are classified in that hierarchical tree.
> > 
> > We probably need a tutorial showing how to use this stuff...
> >   
> Thanks for the reply but I am afraid it's not what I need to achieve.
> I've already managed to define static hierarchy by defining
> hierarchical field, adding it to used document type and querying by
> that field value. The problem is that I'd like to be able to create
> (modify) hierarchy without changing static field hierarchy
> definition... So users of my CMS could just add new document, choose
> parent document from a listbox and see it in the navigational tree...
> That's why I was trying to make link field hierarchical and query by
> this field ...
> 
> I hope I've managed to make myself clear enough... Do you see it
> possible in the current Daisy version?

I think that what you're asking is possible is right now, though I'm not
sure I understood you correctly.

You can have both the selection list and the navigation tree build up
dynamically from documents.

I think you already wrote before that the selection list is working:

> I've already figured out that it's happening when such a field is marked 
> as hierarchical. If I set it as non-hierarchical then it's working: 
> field value selection list is showing hierarchical list of possible 
> entries. 

For the navigation tree, it is important to understand that it will show
the actual hierarchy in use by documents, and not the hierarchy as
defined by the selection list. Thus if you add a new node to the
selection list, which is not yet used by any document, then it will not
show up in the navigation tree either.

I'm not sure if this makes it clear?

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org


More information about the daisy mailing list