Make display view-id an option like sql output

Created on 6 April 2024, 2 months ago
Updated 8 April 2024, 2 months ago

Problem/Motivation

For a newbie it is hard to find out what the $view->id() of a view is.
And for everybody else it could be faster to just see at the page where a view is designed.
I did not find a specification that explains where I would get the view id.
I found some screenshots https://stackoverflow.com/questions/72370467/how-do-i-find-the-view-name...

But I think these basic information should be much easier to find and access. It would also help adoption.
Thank you all very much for your efforts!

Steps to reproduce

I know everybody is used to looking into the page html, but it would be much faster to just get the view id like the optional sql-query output.

Make display view-id an option like sql output. It would make development faster - especially for the newbie. Please, see screenshot.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
Views UIΒ  β†’

Last updated 11 days ago

Created by

πŸ‡¦πŸ‡ΉAustria maxilein

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @maxilein
  • πŸ‡ΊπŸ‡ΈUnited States cilefen
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    The id is the machine name right?

  • πŸ‡¦πŸ‡ΉAustria maxilein

    That's the point. It was absolutely not clear (no clear result when searching it) where to get that name from...
    In order to identify a view display you need both: id + machine name of display.

     if ($view->id() == 'your_view_id' && $display_id  == 'machinename_of_view_export_display') 
    

    The machine name of a display is already shown when editing a view. But the id of the entire has to be derived from the original title. It gets more confusing when the view was renamed...

    Let's say the title was "My View" - the id is probably something like my_view
    If you rename the view "Not My View" then I think the id remains my_view. Which is ok. But harder to find out.
    This issue is just to make it easy to find the view id. That's all.

    Here is the only proper orientation I found on this:
    https://stackoverflow.com/questions/72370467/how-do-i-find-the-view-name...

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    The machine name is in the URL when you edit the view and on the admin listing

    The display ID is shown as 'machine name' in the third column in Views UI.

    Is this perhaps a docs issue rather than a missing feature?

  • πŸ‡¦πŸ‡ΉAustria maxilein

    It is definitely a doc issue.
    But on the other hand: I rarely go to the list of views. I use the contextual menu on the view directly to go to the edit window.

    I did not even realize that the view id is already listed there...

Production build 0.69.0 2024