[daisy] Hierarchical document structure visible in navigation tree

ccmail ccmail at interia.pl
Mon Jan 7 10:55:56 CST 2008


Bruno Dumon wrote:
>
> 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. 
>>     
>
>   

Unfortunatelly I was not right when I've wrote that :-/. The problem is 
that if I create link field (let's call it ParentLink) with 
parent-linked selection type (but NOT hierarchical) and add it to 
MyTreeDocType it works in terms of seeing proper tree-like structure in 
list-box while editing an instance of MyTreeDoc. The thing is that query

select $ParentLink, name where documentType = 'MyTreeDoc'

is not working correctly (ie. how I'd like it to work) in the navigation 
tree. If my document structure (as defined by parent-links) looks like this:

my root doc
  chapter 1
    chapter 1.1
  chapter 2
  chapter 3


then this query results in something like this appearing in the 
navigation tree:

[null]
  my root doc
chapter 1
  chapter 1.1
my root doc
  chapter 1
  chapter 2
  chapter 3

So it's showing all documents under particular document's parent node 
but without taking parent's hierarchy into account. It's only grouping 
by parent, but not following full hierarchy... In other words - query 
gets set of pairs parent:document_name, groups by parent and displays it 
in a tree being maximum one level deep.

And when I make ParentLink hierarchical then I'm getting exception 
thrown at me when attempting to add/edit instance of a document....

I see three options:

   1. what I try to achive is not possible :(
   2. I'm doing something wrong while defining hierarchical link-based
      field (how to amend it?)
   3. I'm doing something wrong in creating navigation descriptor (how
      to make it work?)

> 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.
>   
Yes, I get it.

Regards,
Wojtek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cocoondev.org/pipermail/daisy/attachments/20080107/247e8e39/attachment.htm


More information about the daisy mailing list