Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
6.x-1.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2010 at 01:39 UTC
Updated:
1 Jun 2010 at 09:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
jonskulski commentedHere is a possible approach.
Comment #2
joshk commented+1 for this. It allows for a lot of useful flexibility within practical site-building. Without this, you end up building nearly identical views that show different sets of fields.
Comment #3
jonskulski commentedI'd also like to check if the view is using a fields enabled style_plugin, but at the point I need to check (building the pane setings form) the view isn't built enough to do a check like
If we run a $view->execute(), then we have enough information. I don't really like that solution and if we can avoid it, I would like to.
Do you have any advice for this check?
Comment #4
joshk commentedIMHO if this is for the views content pane administration, it's a rare operation so an "expensive" $view method call would be ok. There might be a better way though; I'm surprised we don't get this from the initial load though. Perhaps Merlin will appear and give us some guidance.
Comment #5
merlinofchaos commentedHmm. The approach seems reasonable.
What about calling $view->init_style() to get the style plugin initialized? You're allowed to initialize that early if needed, though arguments will change it if they're using summary views. I don't think that's a huge deal at the point you need to check to display a list of fields.
Comment #6
jonskulski commentedThanks merlin.
Rerolled.
Comment #7
jonskulski commentedAvoiding an invalid foreach error. If you added a views content pane, then turned on fields override without resubmitting the form then we would get the error.
Comment #8
sdboyer commentedThis is indeed some nifty functionality, color me convinced. I have a nagging feeling I'm missing a small bug in here somewhere, but my basic tests indicate it to be stable enough that I feel OK committing it. So if there does turn out to be an oversight somewhere, we can deal with that when it they arises :)