maintain block display for a node's children?
highvoltage - April 27, 2009 - 07:15
| Project: | CCK Blocks |
| Version: | 6.x-1.1 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Earl Grey |
| Status: | won't fix |
Jump to:
Description
Can cck block display(or be made to display) a field found in the parent node of a book throughout the entire book?

#1
Can you give me an expample? Do you want to have the same information on every page of the book or do you need always the content of the parent of the currently displayed block?
#2
I'm using an image field on the parent node of my books to display a cartoon series banner. The parent node acts as a wiki page for information a series, and the child pages contain files related to the series. I'd like the banner image to be displayed on all pages of that book, instead of just the parent node, to maintain a sense of being within that series' 'area'. So I just need the image to be displayable on all the parent node's children.
Hope I'm making some sense.
#3
Do you have this page live already, so I can have a look at it? It makes much more sense with your explanation, but I didn't get it completely, yet. I think, there is no link form a parent node to his childs, nor the other way around (correct me, if I'm wrong; I haven't used the books module, yet).
Maybe it's suitable to create a content type for each book and use this for every page of the book. You can easily add an image field with a default image to that content type. You don't use that content type for the parent page of the book, so the image is not displayed there. If you want to use one content type for all pages of that book, including the first page, you can exclude this page from displaying the block with the image.
I guess, we find a solution for you without hacking cck blocks ;-)
#4
There are hundreds of books unfortunately so that wouldn't work. There are indeed links to all children in a book, they appear as a list of links at the bottom of the parent node.
#5
Okay. The problem is, that there is no information in a child block about it's parent. I guess, the links in the parent node are HTML links and we are not able to parse the content of the node for links to its 'children'.
What we are doing is only displaying information that is already available with the node. So, if you can find a module providing a cck field, that authomatically references the parent block for each child, then we can display that information for you in a block. As you talked about hundreds of books, I guess adding that pointer from the children to their parent manually is no option, right?
The most interesting question is: "does drupal know the relationship between children and parents?" If yes, how do you establish this connection?
I'm sorry, but I'm quite sure, that we can not solve your problem only with cck blocks. I'm changing the status to "won't fix", but please don't hesitate to come back with further questions.