Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I see there aren't many filters related to books, yet it would be helpful if we were able to sort by specific books to created views such as "latest entries", "latest pages", "recently edited", etc etc.
Would it be possible to add more book based filters to list the content within books?
Even just a simple filter by book that allows you to select one of the books on your site, would be invaluable in my particular case.
Comments
Comment #1
dawehnermh books are just nodes so you can sort filter with the node filters.
recently edited is for example node: updated
Comment #2
highvoltage CreditAttribution: highvoltage commentedYes, but books also have children, thus a useful filter might list all the children of a particular book. Displaying particular fields that belong only to particular books would be useful too. There are plenty of possibilities for filters that can be useful.
Comment #3
dawehneri'm not sure but did you tryed out the relationships "book parent" and "book" ?
i think you could do all this with them
Comment #4
highvoltage CreditAttribution: highvoltage commentedI have at one time and I didnt find a way to filter by book. Honestly I'm not sure what uses the available book relationships have at all. Maybe I'm missing something? Would be nice if I could display a list of children of the current book with views(sort of a replacement book navigation using views).
Comment #5
miiimoooI agree. It seems there are two ways to only display top level book pages *only* but not a single way of displaying top level book pages AND nodes that aren't part of a book.
Just looking at the query it would be as simple as changing
to
Comment #6
miiimoooI've started writing a views filter to do exactly this and it sort of works - see code below. Now, I'm trying to convert this to proper views syntax but I'm a bit stuck. Should the join look like this:
What other calls should I make to modify the query object to do this?
Comment #7
miiimoooComment #8
miiimoooI've rolled this into a module. Maybe could be done better and be a patch for views but it's working.
See http://drupal.org/project/views_child_remover
Comment #9
dagmarIf you don't provide a patch, there isn't anything to review.
Comment #10
miiimoooWhat about the module?
Comment #11
dagmarFrom: http://drupal.org/node/367392
We cannot review your module because you post an issue in the view issue queue. If you module provide a solution for this feature request, please change the status to fixed, and category to support request. If not, you have to provide a patch for views.
Comment #12
miiimooook
Comment #13
webel CreditAttribution: webel commentedI'm also interested in an 'ancestor' filter against a passed argument, so that I can display selected content from all children (deeply) under a given ancestor.
Comment #14
bomarmonk CreditAttribution: bomarmonk commentedCan either miimo's module or current views functionality allow you to create a view of all nodes-referenced within a certain book? I have book pages with node references, but I would like to show the nodes that the child pages reference on the parent book page (using an embedded view).
Comment #15
bomarmonk CreditAttribution: bomarmonk commentedI've created a separate support request for my question here: http://drupal.org/node/619142
Comment #16
esmerel CreditAttribution: esmerel commentedseperate module created, no patch to views, no updates to issue for 6 months.