Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
book data
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2009 at 20:01 UTC
Updated:
27 Dec 2010 at 23:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
stacysimpson commentedAnybody have suggestions for how to create a relationship between the node revisions table and book table?
Comment #2
merlinofchaos commentedIn theory you would create the node_revision->node relationship which would then open up all the node information as well.
Comment #3
stacysimpson commentedThanks for the input. The node_revision->node relationship is available. Here is the query that I need to generate:
Basically, I need the following:
1. Ability to join the node_revisions table with the node table and the book table.
2. Ability to pass in the root book node id as a parameter
3. Additional revision version filter for filtering out revision log messages for revisions that haven't been published yet.
From the views source code documentation, "The base relationship handler can only handle a single join. Some relationships are more complex and might require chains of joins; for those, you must utilize a custom relationship handler." It seems that I would need to create a custom relationship handler to join the node_revisions table with both the node table and book table.
Does anyone know if that is the correct direction? Any other thoughts or suggestion for how to approach the custom relationship handler? Many thanks!
Comment #4
merlinofchaos commentedOnce you add the node_revision -> node relationship, node fields (Including book fields) should automatically become available for use with that relationship, so yes, that should be all you need to create this query.
Comment #5
stacysimpson commentedI don't see a method in 6.x 2.3 to create a node_revision -> node relationship. It seems to be one of what the documentation calls an implicit relationship.
Comment #6
stacysimpson commentedmerlinofchaos (or others), appreciate the feedback, but wondering if you have any other thoughts. Again, the book-related information is not available when the 'node revision' base is chosen in Views. When choosing 'node' as the base, they work. Thanks again!
Comment #7
merlinofchaos commentedI think this is an unfortunate side effect of having an implicit relationship rather than explicit, which means you can't do this without a relationship which does not yet exist. :/
That makes this a feature request.
Comment #8
dawehnerSo here is one
Comment #9
merlinofchaos commented'base field' should not be 'node'
The labelling on this field needs work. I couldn't find it at first. Relationships usually need separate title and help lines.
Comment #10
dawehnerHere is a from my perspective better help text
Comment #11
merlinofchaos commentedChanged wording a little more and applied to all branches.