I created my own view thanks to Views module. How can I check the machine name of that view?


4 Answers 4


Go to the edit screen for your view. At the top right, just under Displays you will see a button labelled Edit view/name/description (right under the Save and Cancel buttons). This is a drop down. Click on it and choose export view.

The second item in the export is the machinr name of the view:

$view = new view();
$view->name = 'your_view_name';
$view->description = ...

Hope this will help you.

  • In Drupal 7 if you want to know whats your view MACHINE name.

To get VIEWS machine name

  • Edit your VIEW, in the URL you can see machine name sitename/admin/structure/views/view/machine_name/edit

To get Display Machine Name

  • Go to VIEWS > ADVANCED TAB > Machine Name

    enter image description here

  • 1
    To avoid confusion, that is the machine name of the display, and will be different for different display modes for the view.
    – Triskelion
    Aug 1, 2013 at 22:37
  • I totally agree with you. Thanks for clarification :)
    – Inizio
    Aug 2, 2013 at 7:05

You can also hover over the 'edit' button for the view in the views list (admin/structure/views) to see the view machine name in a browser tooltip - may be a little easier than exporting the view?


I found the way to check that is used machine_name was using the following function for an a page:

$current_view = views_get_page_view();
$machine_name_current = $current_view->current_display;
print $machine_name_current;


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.