I have added, to a content type, an imagefield that contains one or more images. But I don't want to display these images directly (I include them inline in node bodies). So in the Display settings for this type, the inline image field is set to "Hidden" for both body and teaser, and "Exclude" is also checked for both. Nodes of this type display properly as web pages, but in the print-friendly or PDF versions, the image fields are, incorrectly, included.
It appears to me that the print module uses the same means of rendering nodes as the rest of Drupal, so I don't understand how the suppression of this field is being ignored. Any idea what can be done? Thanks!
Comments
Comment #1
jcnventuraThis is actually a CCK use issue, but I can answer it for you. In the display settings for that type, there's a tab called 'Print' which controls how CCK chooses to display those fields when building the print version of a node.
Set it correctly to what you want and it should start working.
João
Comment #2
noelbush commentedAch! How stupid of me. :-) Thanks for the help, and sorry for taking up your time.
Comment #4
kenorb commentedThanks.
Comment #5
foutrelis commentedI have all CCK fields set to <Hidden> for the Print view. However, since 6.11 (and still with 6.12) they are included in the print and pdf views.
Did something change in 6.11, or am I doing something wrong?
Comment #6
jcnventuraIndeed, something changed.. I have to take a look at it.
The build mode should not have been affected.
Comment #7
jcnventuraI've just tested the build mode and it's working for me.
The module now uses node.tpl.php to render the node content. If your node.tpl.php doesn't include the logic to test whether a field is enabled or not, this could be the reason why it's happening to you.
João
Comment #8
foutrelis commentedJoão, I think you're right. I'm indeed outputting extra content based on the values of the fields I have. My code in node.tpl.php goes something like this:
The fact that print<6.x-1.11 didn't expose this problem in my code threw me off.
I'm setting the report details back to their previous values.
Thanks for the quick response by the way!
Comment #9
rgnyldz commentedHi,
The same goes for D7. Hidden fields are shown in print page. Should I open a new issue ?