5

I've got a problem "browsing" folders in my Sharepoint 2010 document library. In my opinion there are two ways of accessing folders, but I can't see the difference.

1) http://hostname/doclib/fodler/subfolder/secondsubfolder and

2) http://hostname/doclib/Forms/AllItems.aspx?RootFolder=%2Ffolder%2Fsubfolder%2Fsecondsubfolder&FolderCTID=0x012000C77CAA95BDB1F64190861DEBBE604440&View={03FE35CE-2568-4C17-89E1-95793E6BE73B}

Both work great as long as I'm making no changes to AllItems.aspx, but I got a problem when customizing my AllItems.aspx. My Document Library is loosing it's view in the settings and I'm getting " The webpage cannot be found " in option 1).

Probably the problem is the custom page itself or the view, but I can't see the exact problem.

What I want to do is:

Display a custom webpart-page instead of the common AllItems.aspx, but access it exactly the way SharePoint does with AllItems.aspx. Option 2) might work but needs to access the exact folder and view by guid right? So it's not quite easy to achive this dynamically.

What I tried:

I Replaced the complete source code of AllItems.aspx with the source code of my custom webpart page.

Has anybody an idea how I could solve this?

5
  • Why do you need a custom web part page? If you simply need to add web parts, can you try editing the allitems.aspx page and inserting the webparts needed?
    – Deepu Nair
    Commented Jan 10, 2012 at 8:10
  • I need a complex 4 column layout for my webparts and not the standard 1 column layout from AllItems.aspx. So I created a more complex webpart page and tried using this..... generating the problems I mentioned. Commented Jan 10, 2012 at 8:22
  • why dont you just create a new/default view for your type of documents ?
    – SunChero
    Commented Jan 10, 2012 at 15:30
  • Don't use folders in SharePoint 2010, use Document Sets
    – Bart
    Commented Jan 11, 2012 at 10:38
  • I need a dynamic solution so creating new views each time a new folder is created won't help. I'll try to get more information about document sets. Anyway it doesn't help me to solve the problem with the pathes and the way sharepoint accesses them. Commented Jan 16, 2012 at 11:44

1 Answer 1

3

I would not recommend to replace the AllItems.aspx with another custom web part page.

Rather, I would suggest to first make a new View copying from the AllItems.aspx (For Eg:- "NewAllItems.aspx") and then modifying this NewAllItems.aspx page in SharePoint designer. Try creating table structure or other complexities inside the "PlaceHolderMain" content place holder and you would be able to achieve your 4 column layout (Do not remove or edit whatever is included by default within the page).

Make this view as the default view and everything should go well, including directory browsing.

6
  • Ok I also tried working with another view. After replacing the main placeholder with one I built in a custom webpart part page. I got a similar problem. Sharepoint then uses the default view as a kind of fallback, because the new view also gets lost. Commented Jan 11, 2012 at 10:06
  • When just adding 2 custom webparts and 1 additional document library(xslt view webparts) to allitems.aspx using sharepoints ui everything works well, but I don't have 4 columns. Technicaly it's ok. But then I get another problem. In the xslt view wp that's not the original one for this document library. All folders are shown in the default view, no matter where they are exactly placed. Commented Jan 11, 2012 at 10:11
  • I would suggest not to copy paste anything from your custom web part page. Try recreating the same thing inside the placeholders step by step. Save each step and check if there are any issues and then proceed.
    – Deepu Nair
    Commented Jan 11, 2012 at 11:08
  • That's what I did as well. I ran into the problem I mentioned above. One xslt list view webpart looses the information about the folder-position inside the doclib and displays all folders in the first level of the doclib. In my opinion this is because of a lack of functionality. The url parameterizes only one "rootfolder". I dont'know who to parameterized the second rootfolder. Commented Jan 11, 2012 at 11:33
  • Did you check the option of "Folder Scope" in the right hand top corner on SPD while editing the xslt webpart? Change these options to check if you get the desired output. OR, if you give rootfolder=/doclib/folder/subfolder, then you will be redirected to the subfolder documents as the root one. If that was not what you were looking for, please explain how your root folder should behave with an example. May be I have understood it wrong. Thanks.
    – Deepu Nair
    Commented Jan 11, 2012 at 11:55

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