Closed (fixed)
Project:
Field collection
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Aug 2012 at 22:27 UTC
Updated:
17 Mar 2015 at 21:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pirog commentedHere is some code to do this in a custom module
Comment #2
pirog commentedhere is a patch to the latest 7.x-2.x-dev branch in case people want to do that instead
Comment #3
jcnventuraThanks for the patch!
http://drupalcode.org/project/print.git/commit/0122e31
Comment #4
jcnventuraOne question, to fago or pirog: Considering that the 'print' view mode is part of the core book module, why is the above patch needed?
Comment #5
pirog commentedIf book has a print view mode also then i guess the real question would be not why this patch implements a print view mode for field collections but why this module does so in general. The purpose of the patch was just to extend the print view mode already provided by this module beyond just node and to field collections as well. Maybe we should consider removing the print view mode from this module all together?
Here are some additional thoughts:
I am not super familiar with book... but is "print" in the book module intended to provide the same kind of use case as the one in this module, ie to determine how an entity is to be displayed for "printing"? If they provide different use cases then i think we should probably rename the one provided by this module.
If they provide the same use case then we would probably just want to have this module check to see if book is enabled and if not then provide the view mode itself?
Comment #6
pirog commentedSo here is what is in both Print and Book
Print:
Book:
So if the use cases are the same would we want to just add a check to see if book is not enabled for Print's implemention? The field collection patch could then stand since it probably doesn't make a ton of sense to put it in book but ive seen crazier things... such as on the 71L bus this morning.
Comment #7
jcnventuraIs a check for the book necessary? I think it just overwrites it with the same info, anyway...
Comment #8
pirog commentedYeah if there are no namespace collision issues to worry about then i am all for keeping it the way it is.
Comment #9
jmuzz commented