Drupal - How do I display/edit the machine name for a View?
You can export view, change values, delete original and import view back.
There is a import option in the views listing page. Just paste this url after your current url and you will see the import views page. By seeing your tags I am assuming you are using Drupal 7, so the given below url will work only for Drupal 7.
Below is the url to be added :
#overlay=admin/structure/views/import
To export view:
go to /admin/structure/views
under 'operations' column click on arrow and select 'export'
copy code and edit/change in external editor
go to /admin/structure/views/import and import changed view You can first delete existing view or select 'Replace an existing view if one exists with the same name' on the import settings –
I don't think you can change the machine name of a view, at least not in the UI. You can see the machine name in the URL if you mouse over the "edit link".
You can clone it with the new machine name.
Update: How to display the machine name for a View.
You can see list of all views in your Drupal installition using this code:
$views = views_get_all_views();
// Optional: views objects are big so unset large members
foreach ($views as $machine_name => $view) {
unset($view->display, $view->localization_plugin);
$views[$machine_name] = $view;
}
// Print array keyed by views machine name
dpm($views);
You can run this code on page devel/php
(needs Devel module).
There will be printed array of views keyed by machine name and you will be able to find your lost view.
Update: You can search views by machine name at views list page in Drupal 7. For this you should turn on flag "Show filters on the list of views" in Views settings.