0

I have a list. There are multiple views created for it. I added the list to a site page as an app part. I clicked edit and then edit web part in the top right corner of the list box. I went under "Miscellaneous" and unchecked the "Disable view selector menu". Now I can see the alternate views created by clicking on the three dots which pull up the drop down menu. However, once I click on another view, it takes me to another page with solely the list, and now some of the views are displayed next to each other at the top with the three dots pulling up the rest of the views. I guess I'm confused about why the view navigation is different when the list is viewed on a page compared to when you view the list itself in the background by going to site contents. Also, I did check the box for the views to be public when I created them.

1 Answer 1

2

In SP2013 there is a property of the view selector menu control called SurfacedPivotCount that controls the number of views shown horizontally before the rest get put into the ellipses menu. Apparently the default for the list view web part that gets created as the "main" view of the list (at the URL /site/Lists/MyList/AllItems.aspx) is 3, which is why it shows 3 view names before the ellipses.

See this other answer for more detail and how to override the default if you want to.

My guess is that when you add a LVWP to another page (as an App Part), the default is set to 1.

Additionally, the reason you are taken back to the main page of the list when you change views is that the links go to the URLs of the views, which is sort of "under" the list. For example, you create a site page, and add a LVWP to the page that is looking at your list MyList. The URL of that page might be

/site/SitePages/MyCustomPage.aspx

Then, you enable the view selector menu on the webpart, and go to choose another view. However, when you select the other view it's really taking you to

/site/Lists/MyList/MyCustomView.aspx

In fact, all of the views in the view menu are going to point to something like

/site/Lists/MyList/SomeViewName.aspx

Which is why, I would guess, that "Disable view selector menu" is checked by default. Enabling the view menu on a LVWP on a site page leads to some unexpected behavior.

I do not know if it is possible to change the view showing in a LVWP on a site page through the view menu. You can change the one view shown there by editing the web part, and in the List Views section at the top, select the view you want shown. Or, edit the current view to show the view you want there

I have always used that web part on site pages as a single view mechanism, I have never messed with the default of not showing the view menu.

As an aside -- if you edit the web part, and choose a view that was previously set up on the list itself, and then decide to edit further, you will not change the view as defined on the list. When you choose one of the pre-defined views, it actually gets copied to the "Current View" of the LVWP on the page, and any further changes do not propagate back to original view definition.

1
  • Thanks! That was great information! My main concern is the extra step users would have to take. It's annoying for them to have to click on the title or view name itself to be taken to the list main page. They might be annoyed that they have to be taken to a completely different page. I don't understand why there isn't a simple setting to change this.
    – Andrew
    Commented Jul 29, 2015 at 17:06

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.