Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2009 at 05:33 UTC
Updated:
23 Dec 2010 at 19:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
edjay commentedif you have enable the "VIEWS UI module" you have access to your views in the site building part of drupal.
There is a list of your views you can override it or disable/delete it.
If you have created your views with the interface you have to export this views in a module then you will be able to disable the views and not delete it.
For the export you have a tool in "TOOLS" section of view where you can mass export views in a module. it gives you the instructions for create a module.
Comment #2
edjay commentedOUPSS two comments ^^
Comment #3
liquidcms commentedok, yea i knew i could export it to save it; then delete it.. just seems like it would be easy to just have a setting in UI to disable
thanks.
Comment #4
merlinofchaos commentedWill consider this feature for the 3.x branch.
Comment #5
rooby commented+1 for this feature in the next version
Comment #6
esmerel commentedComment #7
dagmarHere is a first version for this feature.
Comment #8
dawehnerThe code links fine beside execute_hook_block and execute_hook_menu
I would like to have this feature much deeper in views. I guess view::set_display would be a place to check for it.
This would a) simplify the code and b) make it more robust.
I'm not sure whether this will work.
Comment #9
dagmarMmm. #8 doesn't work: See attached image.
Comment #10
dagmarOk, this works, as merlinofchaos suggested, check if the display is enabled at build() function is enough to disable a display.
Comment #11
dawehnerThis makes sense. The display plugin takes care to return the right thing if the build failed. For example the page display returns drupal_not_found().
Manual testing worked fine.
I'm wondering whether it would make sense to move the setting to a button like "remove display".
The rest is RTBC
Comment #12
merlinofchaos commentedProbably yes.
Comment #13
merlinofchaos commentedCommitted this. I think we can change the UI in a follow up patch if necessary but it's nice to have the feature.