5

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

8

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 = ...
3

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 '13 at 22:37
  • I totally agree with you. Thanks for clarification :) – inizio Aug 2 '13 at 7:05
1

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?

0

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;

Saludos.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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