By ñull on
Of course I could copy one by one all fields and settings that the master becomes exactly the same, but isn't there an easier way? In a display there are three options:
- This page(override), the present setting of the display
- All displays
when I use it will mess up my display. For instance in a field it removed all other fields in the display. Not a solution. - refert to default
which will mess up my display too.
So what is the way to do this besides doing it by hand? May be there is contributed module for this?
Comments
+1 looking for same thing
+1 looking for same thing
Cheers,
TechNikh
In 30 seconds set up Automated Visual testing of your website. Zero coding. https://drupal.org/project/drulenium
Ever dreamed of styling your view, We have a solution for you. https://drupal.org/project/views_stylizer
no following here?
no following here?
+1 subscribe...
Looking for the same thing
Looking for the same thing myself. Can't seem to find an answer thus far.
Doable with devel
It is possible to transfer all the overrides from a display to the master display of a View by running a PHP snippet in /devel/php (provided by Devel module). Of course, make sure you save an export of the original view before trying this out since I can not guarantee it will work perfectly for every View.
The template for the snippet is this:
Just make sure to replace "machine_name_of_my_view" and "machine_name_of_the_overridden_display" with the correct values for your use case. The last line is commented in order to allow inspecting the output of the two dpm() calls to make sure the new view will be set as expected; once you feel confident about the result, save an export of the view, un-comment the last line and re-run the snippet.
Thanks jedihe!!!
Thanks jedihe!!!
awesome.. thanks.
awesome.. thanks.
Peter Lindstrom
LiquidCMS - Content Solution Experts
Worked flawlessly
Thanks!
Still works!
This still works like a charm! Just used with a Views 7.x_3.15 version of Views.
Still works!
Drupal views version 7.x-3.24, worked like a charm, Thanks!
Thanks, Works
Thanks @jedihe worked perfectly for me with Views 7.x-3.18 and Devel 7.x-1.5 with Drupal 7.56
This problem still exists in
This problem still exists in Drupal 8 today, for which I've created an issue + patch for anyone interested: #2907995: Views UI sometimes fails to set overridden display to "All displays"
From my understanding the
From my understanding the question is How to copy all display options from a display to master.
In my case I did it with:
1. Export the view.
2. Locate the section where my correct display options are. In my case they where below $view->new_display('page', 'Page-name', 'page');
3. Copy the section of $handler->display->display_options
4. Paste them below Display: Master - $handler = $view->new_display('default', 'Master', 'default'), replacing the existing display options
5. Import the view.
6. Delete the old view.
I hope this helps.
This worked for me on 7.72.
This worked for me on 7.72. Thanks so much!