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.
I'd like to use panelizer on a field_collection, http://drupal.org/project/field_collection
Comment | File | Size | Author |
---|---|---|---|
#20 | field_collection-panelizer-integration-2110273-20.patch | 11.09 KB | osopolar |
|
Comments
Comment #1
tkuldeep17 CreditAttribution: tkuldeep17 commentedYes, You can use panelizer on a field_collection it. Can you please explain, what problem you had faces..?
Comment #2
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedon a content type panelizer option shows on the edit page.
There is no edit tab for a field_collection.
I have a feeling there might be a panelizer admin page that I should be viewing and maybe the field collections will be there
Comment #3
drupalninja99 CreditAttribution: drupalninja99 commentedI have downloaded 3x dev and I still don't see field collections as an option at /admin/config/content/panelizer. Am I doing something wrong or are field collections not able to be panelized?
Comment #4
DamienMcKennaLets move this over to the Field Collection issue queue.
Comment #5
DamienMcKennaTake a look at the #1820442: Panelizer for Comments for an example on how integration was built for the Comment entity.
Comment #6
DamienMcKennaClosed a duplicate: #2155567: Add Panelizer support to Field Collection
Comment #7
osopolar@tkuldeep17: May you be so kind and describe how to get panelizer work on field-collection? Thanks.
Comment #8
osopolarHere comes the ctools entity plugin. It took me some hours to get it work, because I overlooked that the entity type is actually
field_collection_item
.I still get this warning on the panelizer page (admin/structure/panelizer) in case of Full page override:
But field_collection_item_view does not yet appear in the Page Manager. I must have missed something, but can't see it right now. EDIT: Now I see, this also would require a task handler to handle the "field_collection_item override task". Hm, this is too much for now and it seems not to be necessary unless someone who needs Full page override.
Any reviews would be greatly appreciated. I guess there is some stuff missing, like determining if revisions are allowed.
Comment #9
osopolarWithout Page Manager and Revision support.
Comment #11
osopolarNow the two patches in one.
Comment #12
osopolarI added task handler (field_collection_item_view.inc) to the patch.
There is one thing missing which I really need but didn't get to work is a relationship handler for field-collection to host entity. As this is not really necessary to use field-collection with panelizer I will create a follow up issue for that. It would be really cool if these days anybody could help me with that, thanks: #2567585: Ctools relationship plugin to add host entity context to field_collection panels
Comment #13
osopolarComment #14
osopolarFIX variable name to get rid of note:
Comment #15
maximpodorov CreditAttribution: maximpodorov commentedhttps://www.drupal.org/project/entity_panels which supports Field Collections can be used also.
Comment #16
NWOM CreditAttribution: NWOM commentedThanks for your work! I'm not sure if I'm using the patch though properly.
Basically my goal was to override the field collection edit form with panelizer, so that when I add the form field to a panelized node edit page, it will display the panelized field collection form, rather than the default. It currently doesn't seem to work. Thanks in advanced for the help!
Comment #17
DamienMcKennaJust to mention it, Panelizer isn't designed for customizing entity edit forms, just the view modes, you should be using Panels for the edit form.
Comment #18
NWOM CreditAttribution: NWOM commented@DamienMcKenna: I started only recently working with Panels starting with the Panopoly distribution in combination with Panels Everywhere, Panelizer, and Page Manager Existing Pages. I more than likely didn't realize what was providing what. I appreciate the info :)
Comment #19
osopolarIn addition to Panelizer support:
In case somebody wants to add lokal tasks (tabs) to edit the host entity while viewing a field-collection item, it could be done with following code in a custom module:
If module maintainer are interested in a patch for field-collection module I could provide that too.
Comment #20
osopolarRe-roll patch as
if ($module == 'ctools') {
was changed toif ($module === 'ctools') {
.