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.
D6 introduced the idea of a build_mode which is perfect for print module. CCK even offers a UI so admins can specify which fields are shown or hidden when in the print mode for each content type. The attached patch implements the CCK hook so we show up as a subtab on its Display Fields form (e.g. admin/content/node-type/news/display/print).
This patch does not remove $node->printing = TRUE but it effectively does the same thing.
Note that cache clear is needed to get the tab to appear in CCK.
Comment | File | Size | Author |
---|---|---|---|
mw.patch | 2.7 KB | moshe weitzman | |
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedHi,
Thanks for the patch! I have committed it to CVS.
João
Comment #2
jcnventura CreditAttribution: jcnventura commentedHi moshe,
Is it possible that your patch caused the problem described in #359343: A few things broken(?) in the lastest dev release?
João
Comment #3
jcnventura CreditAttribution: jcnventura commentedReverting this patch until the cause of #359343: A few things broken(?) in the lastest dev release can be determined.
Comment #4
jcnventura CreditAttribution: jcnventura commentedIssue #359343: A few things broken(?) in the lastest dev release is caused by this patch... Maybe there needs to be a check of some sort around the $print->build_mode line for some dependency on a specific cck module version?
Comment #5
pwolanin CreditAttribution: pwolanin commentedthe build mode should be set (following book module in core) as:
Comment #6
jcnventura CreditAttribution: jcnventura commentedIndeed, taking into account the fact that core provides a perfectly acceptable build mode, I think that the line indicated by pwolanin in #5 is all that is needed.
I'm going to commit the above when possible. The build mode issue is now being tracked in #428024: hook_link and hook_nodeapi problems.
João