Lets say I have 2 views, that both need to be displayed on the same page and in the same content region. What determines which one gets displayed first over the other? I have looked around in the settings, but I can't seem to find them. I want to switch/flip my views around, but there doesn't seem to be a option to do this.

  • If you are using view blocks then you need to go block settings page for flip. – DRUPWAY Oct 17 '16 at 11:58
  • Or If you are using context module then to go context setting page to flip the view blocks. – Pallavi Sugandhi Oct 17 '16 at 12:07
  • You have two entirely separate view or one view with two different display page? – CodeNext Oct 17 '16 at 13:27
  • What is the meaning of switch/flip? Do you want to display both views on same path, but want two separate tabs on that page, so user can click on that and can view whichever view he want? – CodeNext Oct 17 '16 at 14:05

If you refer this Question on stackoverflow: How does Drupal Views decide between multiple displays with the same path, I think he has described both situations of views in his answer as separate paragraph and second paragraph is your answer.

I am pasting the entire answer here of @Andrew Aledge,

If you're referring to the display within the views: each view display has a position and the displays are loaded according to that position in an ascending sort. So if you create a page display (which may get a position of 2 since the Default display typically has a position of 1) and then create another page display after that, the next page display may get a position of 3. The customer will be exposed to the position it reaches first (2, provided that they have met the criteria).

If you're referring to the views themselves: views are loaded in order of their view id (vid). The customer will be exposed to the first one loaded.

If you see the LAST TWO Lines, he has mentioned on which basic the views decide which view will be displayed and which one not. He means that Provided all conditions same, the view will be shown as per the view id(vid)

Other situation: Apart from above two situation, Which view user will see if they have different Roles. So in that can I think It will be decided based on which user has access to which view(I mean based on thier role access), and if same user has access to multiple views then in this case it will decided again based on vid.

I think, above three discussion have cover all the various situation of visibility of view.

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.