I've got several custom modules I have written and they make liberal use of Views, Panels and the CTools page manager. I've exported the views, panels and page variants into the module code, and am wondering if there is any way I can use drush to revert my production site to the new views/panels/variants after I do the rsync, rather than logging in and commencing the click, wait, click routine.
1 Answer
There is drush views-revert
, which alone will give you a list of views to revert, or can also take multiple views names as arguments, as in drush vr archive frontpage
.
So far, nothing like that exists for Panels.
However, if you were to use the Features module to export the Views and Panels, instead of a custom module, you could use the drush commands that Features provides.
-
1Thanks for the info! I tried to go the features route, but the dependency chains got quite tangled, it makes much more sense to me to keep the definitions with the code that's making use of them rather than add yet another module to pile.– JGMJul 27, 2011 at 12:54
-
I completely understand your frustrations with Features. Another thing to keep in mind though, you can add custom code to the .module file generated by features, and as long as you use drush to recreate your features it won't get overridden. Jul 27, 2011 at 13:32
-