vote up 3 vote down
star

Here I find myself again wondering why certain things work and some just don't.

I was wondering how I could display the "View Selector" on a document library webpart? The Site settings AllItems.aspx page of the document library has it, but it seems impossible to set it on the actual page WebPart.

Is this something that can be achieved when adding the Doc Lib webpart or in the views that I missed? I don't want to have to copy the AllItems.aspx webpart to each page that needs it, but if that's what it takes...

Any help would be appreciated. And no I don't want to create a new page for each view and create a dropdown selector to navigate between these pages. Sharepoint has it built-in, there has to be a way to enable it for the 'frontend' webparts too!

Thanks!

flag
I guess I sort of found the answer to it - In SP Designer, you can just find the following first line of the webpart: <ListViewXml xmlns="schemas.microsoft.com/WebPart/v2/…; And then change the Hidden="TRUE" to be DefaultView="TRUE" and update the DisplayName="" to be the name of the DefaultView you've selected. – TeckniX Feb 8 at 17:43

1 Answer

vote up 0 vote down

Not sure if having the view selector is your goal or an attempt to get to your goal.

You might already know this and it may or may not apply to this question, but you can add any ListViewWebPart (the web part that displays content for lists and document libraries) to any web part page, customize the web part and configure the view used for that web part, all through the web UI.

link|flag
Thanks - I did know that. What I didn't realize was that the view selector was a hack. It really doesn't do a true filtering of the current page, instead when you create the view, it simply creates a new page to display the information with the particular filters/groups hard-coded on the page. Thus using the 'view selector' on a page with that listViewWebpart becomes useless, when a user selects a different view, it will send them to the page copy in the backend and you lose your page layout. Once I realized this, it was clear that I needed to create a different page for each views. Thanks! – TeckniX Feb 22 at 23:03

Your Answer

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