Needs work
Project:
Patterns
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 May 2009 at 10:44 UTC
Updated:
12 Mar 2010 at 17:12 UTC
Jump to comment: Most recent file
Comments
Comment #1
cdale commentedI've created a small patch which achieves this. My first attempt was trying to use the Form API to call the correct override action, then call the form again to save the value, but this proved difficult to get to work, so I've opted with just doing what the override submit handler does. It works well.
Example usage is as follows:
Comment #2
cdale commentedOops. That example YAML needs to remove the second override option, as views overrides all those items together....
Comment #3
cdale commentedI've change the patch, so that it now handles override options on the display settings, as well as the handlers. I've also added the ability to remove handlers as I couldn't see this done anywhere. There is also a bug fix for getting the correct display id on the item for update actions. Sorry for bundling this all together. I can break them out into separate patches if it is an issue.
This patch can be used with the following pattern to have a default and page view using a node.created sort handler, and a block using a views.random sort handler.
Comment #4
cdale commentedForgot the patch
Comment #5
vaish commentedI'm really sorry for not getting to this earlier. This was very much needed addition to the views component. Patch committed.
I'm marking this issue as "needs work" because re-running the pattern produces some weird results: all sort options are removed for all the displays and options that were overridden by block display end up applied to all other displays as well. There is a good chance that this is not directly related to this patch but definitely something that we should try to fix. I'm not sure when I will have a time to look into this further.