I want to disable/theme printed current revision of node below Diff comparison table. Currently it's hardcoded in the end of diff_diffs_show():
$output .= node_view($new_node, FALSE, FALSE, FALSE);
return $output;
While it would be probably possible to break in via hook_nodeapi() it seems to me wrong, like correcting one bad behavior using another bad behavior. How about inserting checkbox to enable/disable output, or even better, output whole diff page using theme function so it's overridable ?
I can explain use case for this: currently I am making Panels integration for Revisioning module, and it will be possible to output revision using Panel Page. Next step would be to display node below Diff table using Panels too, or atleast to hide it completely, cause I need to have consistent theming both in "view revision" page and Diff page. I don't want to make template just for that Diff page.
Also, next step would be possible if Diff was fixed: It would be possible to implement "Compare two revisions" CTools content type that would take 2 arguments (2 "contexts") and output diff compare table in Panel Pane. But currently output of diff_diffs_show() is too big and not convenient for using in Panel Pane.
Comment | File | Size | Author |
---|---|---|---|
#2 | diff-themeable_compare_page-521212.patch | 6.99 KB | blakehall |
Comments
Comment #1
crea CreditAttribution: crea commentedMaking it themable would be enough..
Comment #2
blakehall CreditAttribution: blakehall commentedAttached is a patch with makes the entire page themeable, allowing you to override the particular call to node_view and alter the table / add help text.
Comment #3
Taxoman CreditAttribution: Taxoman commentedComment #4
realityloopblakehall what version was your patch for?
Comment #5
Alan D. CreditAttribution: Alan D. commentedThere is really far too much business logic in the theme callback, so can you split this out into a preprocess please and re-roll against 7.x-2.x.
Comment #6
Alan D. CreditAttribution: Alan D. commentedI'm using theme suggestions for all tables and the first two should be using indexed arrays for all rows if you need to pull out this data:
table__diff__preview << On View changes
table__diff__standard << standard comparison page. There is an admin setting to disable preview, so this has everything that is accessable
table__diff__revisions << the form
I can not patch against 7.x-2.x with the work that I am doing, so I either really need git access to push out a 7.x-3.x branch or you can find this in the sandbox project (Diff developmental version 7.x-2.x branch).
Comment #7
Alan D. CreditAttribution: Alan D. commentedThis should be resolved with the new branch, 7.x-3.0-alpha1 or 7.x-3.0-dev.