I want to simplify the editorial experience of my website so people only have to chose the view they want to render and since I leave only one block display to chose I don't want to bother them with that useless choice.
| Comment | File | Size | Author |
|---|
Issue fork viewsreference-2932381
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rodrigoaguileraHere is a patch that does exactly that.
I did a small coding standard fix and made the message that is shown when there is no displays translatable.
Comment #3
rodrigoaguileraI coworker tried the patch and reported that is not working with fields inside paragraphs. I did not test that use case so that needs to be fixed
Comment #6
purushotam.rai commentedComment #7
purushotam.rai commentedComment #8
purushotam.rai commentedWe have to update default display_id in itemResetValues as well. It was creating a issue, hence updated the patch.
Comment #9
jeffschulerMarked #3166491: Hide view display element if there is only one display as duplicate.
Comment #10
sassafrass commentedApplied the latest patch and it hides a single Display as expected. However, I was wondering if it also makes sense to hide the View selection if there is only one View as well? Or to give users the option to hide those fields?
Comment #12
scott_euser commentedSee my comment on the MR + now that we have tests, the tests assume the default behaviour, so we should update the test coverage to cover a View with 2+ displays and a View with only 1 display.
Comment #14
scott_euser commentedAdded tests myself rather than let this sit another 8 years :) Thanks all for the help!