Closed (fixed)
Project:
Fieldable Panels Panes (FPP)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2012 at 14:25 UTC
Updated:
1 Jun 2015 at 23:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
merlinofchaos commentedThat shouldn't be too hard to implement.
Comment #2
Anonymous (not verified) commentedThis supports view modes, and for existing panel panes, it assumes the view mode is 'full' when it isn't specified in the pane settings.
If you need a UI for adding more view modes, http://drupal.org/project/entity_view_mode is the simplest option. You can also implement this hook in a module.
View modes shouldn't be overextended. In the File entity module issue queue, some smart people have offered some guidance about when to extend view modes vs when to alter formatters. When I'm working with a fieldable panel pane that has only one field on it, I might prefer to just reconfigure the formatter for that field.
Nevertheless, here's a patch that I'm going to run with!
Comment #3
scottrigby@bangpound - nice!
I just asked @merlinofchaos about this today in #drupal-panels (in the context of panopoly)… I just finished making a (slightly more elaborate) patch - was just about to upload it, only to find you beat me to it :)
I'm tempted not to fuss with this because it's simple and works
Comment #4
azinck commentedPatch looks good, I'll give it a try. Thanks bangpound!
Comment #5
scottrigbyquick thought - the only thing i might want to see on that patch is to weight the view_mode element so it's with the other configurations (closer to the reusable elements) out of the box
Comment #6
Anonymous (not verified) commentedJust tell me a number and I'll re-roll the patch.
Comment #7
scottrigby@bangpound I had
#weight' => 10, because that's what$form['reusable']was set to… but that was on a fieldset enclosing view_mode, in fieldable_panels_panes_entity_edit_form() :)I think your way is better though. Maybe it makes sense above the reusable options - i'm running out otherwise would check it & reroll now… how about 9?
Comment #8
swentel commentedI think this one needs work, because you can not
a) change the view mode anymore
b) select the view mode of an existing entity in case you have created the entity first at admin/structure/panels/entity/manage/content-wide/add (custom bundle)
Comment #9
merlinofchaos commentedI corrected for #8 -- a) is actually wrong, you can change the view mode during edit, but #2 was correct in that you couldn't set the view mode when adding a reusable pane. I adjusted the form to allow for this (it was kind of tricky so it was probably most efficient for me to do that). I committed and pushed. http://drupalcode.org/project/fieldable_panels_panes.git/commit/a9c0d001...
Comment #10
scottrigbyAwesome =)
Comment #12
eloivaqueI have a same problem. If added a new panes on panalizer, in form of new panes, the field view mode allow select all view modes, still in manage display of the panels i selected 2 view modes.
I attach a patch to possibility solved.
Comment #13
eloivaqueComment #14
xtfer commentedEloiv, this is fixed. You should open a new issue.
Comment #15
drclaw commentedI don't believe Eliov ever created that new issue. Here's one with a patch that does a little extra when there's no view modes with custom settings: #2498623: Only show view modes with custom settings on FPP edit form