Stuff about SharePoint
Accessible SharePoint WebSitesDownload ARF
Great Post :) But why Microsoft really removed it from Document libraries?
I have no idea...only took a few hours to write!! --Vince
This funtionality is really need!! I'm sorry, but I'm new to SharePoint. I deployed the solution, but I don't see a feature to activate or any way to set the up arrow on a list or document library. Any help would be greatly appreciated. Fantastic job! Thanks, Alan
The WSP is deployed globally in Windows SharePoint Services 3.0. But the Up Folder icon/link doesn't appear in document libraries. What more needs to be done? Or is this for an earlier version of WSS? Thanks. >>> Joe
Alan, Joe, The functionality is a 'Feature' and so needs to be activated at the site level. If you goto Site Settings->Site Features you should see a feature called 'Folder Backup Feature', you will need to activate that for it to be enabled. --Vince
Hi, I have deploy globally in Windows SharePoint Services 3.0. the WSP: stsadm -o addsolution -filename TheKid.CustomActions.Backup.wsp but still doesn´t appear in my Site Features List, so I can´t activate it. What more needs to be done? Thanks!!!!
Sorry everyone, it appears the DLL was missing from the WSP (I uploaded the wrong one). It is correct now if you could download it again. You should be able to upgrade the solution STSADM -o upgradesolution or just remove the previous one and add the new one You will then need to deploy the solution.. Central Admin -> Operations -> Solution Management You should then see the feature in 'Site Features' --Vince
Hi Vince, i deploy the new wsp but it doesnt appear again in the site features. have i to do something with the xml file? Thanks for your answers
i think that we will probably need to install a new feature. create a feature.xml , elements.xml and install it. it´s true? or this xml are into the wsp.
The new WSP contains everything you need. Can you rename it it .cab and then unsure the dll is in there? Also the feature is called 'TheKid.Backup', you could check that this feature exists in the 12\TEMPLATE\FEATURES folder. --Vince
i can see the feature folder in 12\TEMPLATE not in 12\TEMPLATE\FEATURES. Thanks Vince
HI Vince,The feature folder isnt 12\TEMPLATE\FEATURES, i copy it in this folder and install it stsadm.exe -installfeature -filename TheKid.Backup the feature appears now in site features and i activate it. what should happens now? if i create a new folder in a library and enter into it, the new button doesnt appear Thanks
Hello Vince, David is correct in that it deploys to the Features folder. After moving it over into the features folder, and installing the feature I notice it does not display in the features (under web) for any of my SharePoint sites. (Weird no?) I looked over the code and everything looks in order, I also could activate it via stsadm but this doesn't seem to result in any change to the interface (David also mentions this) and it is still not available in the site features for me. It's still terrific that you wrote/supplied the source and I can take apart the source code and try and deploy it myself but if you were fixing it anyways that works for me too (and I won't double up the effort). Anyways best of luck just thought I would also share that I ran into the same problems David did as well as the feature not showing up in the managefeatures.aspx page. Thank you, Richard
Thank you very much for this article, i want to mention to: 1.we have to add this DLL as safe control in the web.config of our web application <SafeControl Assembly="TheKid.CustomActions.Backup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=919ab618f7ce98cf" Namespace="TheKid.CustomActions.Backup" TypeName="*" Safe="True" /> 2.change this function to be like that this prevent the up control from appearing in the root folder. private string GetOriginalFolder(ListViewWebPart lv) { string sOriginalRootFolder = (string)GetPrivateFieldValue(lv, "rootFolder"); if(sOriginalRootFolder!=null) if (Page.Request["Key"] == lv.StorageKey.ToString()) sOriginalRootFolder = Page.Request["RootFolder"]; return sOriginalRootFolder; }
Hi, i am having one issue with listview webpart.how can i set variable as filter value with listview webpart.
Hi Vince, I have deployed the WSP got it to show up under Site Features and activated it. However the Button does not show up on any of my lists. Is there something I am missing? Something I need to do besides deploying the WSP file and activating it?
Everyone, I am really sorry for this...for some reason the WSP was not building correctly. I have now re-built the WSP, installed it on two clean VMs and ensured it works. Could you please download the latest version (using the link in the post) and install it. I used... STSADM -o addsolution -filename c:\temp\thekid.customactions.backup.wsp STSADM -o deploysolution -name thekid.customactions.backup.wsp -immediate -allowgacdeployment -url http://site STSADM -o execadmsvcjobs After this I went to the site settings->site features and activated it. It should show up in normal document libraries and in listview webparts. This is site scoped and not site collection...you can modify the feature definition if you want it for all the site collection. Again, I am really sorry for any problems you have had. --Vince
Great feature. But I seem to have the same problem others have. On a fresh installation it works, but on an 'older' installation all installs well, gets added to the CAG and the web.config file gets altered....but no 'Up Folder' button. I tried it on another basic sharepoint installation (just a different master page) and there it doesn't show up either. It seems to do with different settings in SharePoint... Any ideas? I really like the feature and would love to have it available for my users. Roald
New instructions worked great, thanks Vince
Hi Vince, On opening the project file I get an error with "one or more projects could not be opened". Opening the .sln file in plain text shows a second project pointing to a non-existent path. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TheKid.CustomActions.Backup.Solution", "Solution\TheKid.CustomActions.Backup\TheKid.CustomActions.Backup.Solution.csproj", "{B873FFCF-3C9B-4707-AB19-C7C0ED910C54}" EndProject Can this safely be deleted from the solution or is it missing from the zip? Also, the TheKid.CustomActions.Backup.csproj file that is included has post-build copy event as follows: <PostBuildEvent>copy "$(TargetPath)" "C:\Inetpub\wwwroot\wss\VirtualDirectories\spworks80\bin\"</PostBuildEvent> What should this be changed to for my current environment? My primary webapp's \bin directory on the web front end? Thanks for a great solution. Really hoping to be able to use it.
Yes yuou can safely ignore that project...it was the solution project to build the WSP which was causing me so many problems initially. The PostBuild just copies the DLL to the project I was testing it on. You can just remove or modify it. --Vince
In load method, it's better make extended check for visibility: if (string.IsNullOrEmpty(sOriginalRootFolder) || sOriginalRootFolder == lv.TitleUrl.Substring(0, lv.TitleUrl.LastIndexOf("/"))) { Visible = false; return; }
Hi Vince, Thanks for this feature. I want to change the text to Spanish ("Up Folder" to "Subir Carpeta") but I have a problem. When I open the project and i try to generate there is an error with a comand copy.... The dll was generated so i think that there is no problem yet.I dont Know how to make the wsp with the dll. Can you help me? or can you send me the wsp with the text "Subir Carpeta" ?? Thanks for all Vince
My mail is willsti@gmail.com, if you can send me the wsp.
Hi Vince and thanks for a useful feature. I have installed it and it works nice. I have only noticed that when I go up to top folder, icon is is still there and when we click it, it showes all folders and all files in subfolders!? Is it a bug you know about or it is my installation that fails? Navid
Thanks a lot for this; just what I needed... Just had to further modify the check for visibility for it to work well on my site: if (string.IsNullOrEmpty(sOriginalRootFolder) || sOriginalRootFolder == lv.TitleUrl.Substring(0, lv.TitleUrl.LastIndexOf("/")) || sOriginalRootFolder.Substring(0, sOriginalRootFolder.LastIndexOf("/")) == SPContext.Current.Web.ServerRelativeUrl || sOriginalRootFolder.Substring(0, sOriginalRootFolder.LastIndexOf("/")) == SPContext.Current.Web.Url) { Visible = false; return; }
Great stuff. Why there's no up-folder there in the first place I can't imagine! My problem is... initially there is no "Up folder" button at the top level, which is fine. After going into a folder and coming back up to the top level there *is* an "Up folder" button and clicking it causes an error: "The object specified does not belong to a list". I'd live with that, but I know it's going to worry some of our users...!
Following your instructions posted on 19 Nov 2008, the feature works like a charm. The up folder button is visible in the root folder, but after clicking it (twice...ok) it disappears. No errors. I think our users can live with that, given the (essential) feature they now have. Thanks a lot for sharing this with us!
Hi i'm new in SharePoint programming ... how can i make the *.wsp file? Thanks in advance
Hi i have install and deploy in Sharepoint site the *.wsp file that i have download. I don't see anything in SP, how can i do for show this Custom Action? Thanks in advance
Good article! But you have to use Yann's modification to make it work 100% (Thursday, 15 Jan 2009 05:21 by Yann)
Thanks for this. It's so bad that people need to write this themselves and that Microsoft didn't include it out of the box. I can also confirm that there is some sort of a bug with the button appearing on the top level after you go back up there. and that clicking twice on it produces an error: "An unexpected error has occurred. Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator. Troubleshoot issues with Windows SharePoint Services."
Nice Work, Its really a useful feature adn works fine with out anything. Thanks alot.
It may not be necessary for discussion list if (lv.ViewContentTypeId != "0x") { Visible = false; return; } Does anyone have better idea?
Nice Article, But I wanted the "upfolder" button for any specified document library, please tell me how to do it. Thanks, D
Great article.But has anyone found solution for the "up folder" button appearing on homepage which throws this error. "An unexpected error has occurred. Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator. Troubleshoot issues with Windows SharePoint Services."
Great work Vince! One question, any idea why this feature isn't visible at my site collection level? I used the following to add and deploy. No errors, I just need to go to all my application sites and and activate the feature at that level - Was just curious if it could be done at the site collection level. stsadm.exe -o addsolution -filename TheKid.CustomActions.Backup.wsp ---followed by--- stsadm.exe -o deploysolution -name TheKid.CustomActions.Backup.wsp -allcontenturls -immediate -allowgacdeployment -force
---Fix for hiding "Up Folder" when returning to top level--- When drilling into folders, then using "Up Folder" to return back to the top, the "Up Folder" link remains when it should have disappeared. The problem was that going "Up" removed the last segment of the url (after the /), which would ultimately remove the list name. This fix notices when the list name has been removed, and hides the button. --Under this line-- string sNewRootFolder = sOriginalRootFolder.Substring(0, sOriginalRootFolder.LastIndexOf("/")); --Add these lines-- // Hide if back to top level SPList list = (SPList)GetPrivateFieldValue(lv, "list"); string sParentWebUrl = list.ParentWebUrl; if (sNewRootFolder.Length <= sParentWebUrl.Length) { Visible = false; return; } Portions of this (and the original) code use hidden/private fields, which breaks standard object oriented conventions. Just be aware that in the future TheKid's code (and my fix) MAY stop working (though unlikely). Enjoy, -AAron P.S. This code deploys into the GAC, which can be avoided. The permissions needed to install in the webroot\bin instead are shown below. Add these lines as Attributes to the Action class and use WSPBuilder to build the solution with PermissionSetLevel=Minimal and BuildCAS=true: [ReflectionPermission(SecurityAction.Assert, Unrestricted = true)] [SharePointPermission(SecurityAction.Assert, ObjectModel = true)] [SecurityPermission(SecurityAction.Assert, Flags=SecurityPermissionFlag.Assertion|SecurityPermissionFlag.Execution)]
Correction... My previous post only worked with libraries. Use this code chunk to allow use with any type of list. // Hide if back to top level SPList list = (SPList)GetPrivateFieldValue(lv, "list"); string rootiest = list.RootFolder.ServerRelativeUrl; if (sOriginalRootFolder.Length <= rootiest.Length) { Visible = false; return; } NOTE: I've noticed that when adding list web parts to a single page, and clicking around folders within those web parts, the "Up Folder" link gets confused and displays at inappropriate times. So, if you want to use this "Up Folder" feature (thanks Vince), make sure there is only one list per page.
Thanks for the fix. Could you please update the WSP-file so that it contains the fix?
Thanks for this! and thanks to AAron for the fix. Now, how do I turn this source code into a WSP that I can deploy? Lil help?
Hi Mike, You can also download a WSP on the top of this page. To create a WSP file from the source code, please download Visual Studio Extensions for Windows SharePoint Services (VSeWSS).
Hi Vincent, I'm considering adding a second button to this solution, next to the Up Folder. This is for letting users create an alert for the list/library, instead of having to open the Actions menu. Any tips on how to go about this task? Thanks.
Hi Vincent, Thanks for this feature. But I have discovered following problem: In my document library is following folder structure: /folder1/folder2/folder3 When I'm in folder3 and click "Up folder" then I get to folder2 - it's OK. But when I go back folder3->folder2->folder1 by "Up folder" button then I'm in root of doc library and I see "Up folder" button. So I click on "Up folder" button and all folder from doc library are displayed, ups...it's not good. Can you send me wsp with czech word of Up folder - "Nahoru". I'm not good programator and I'm afraid, that this is out of my abilities. Thanks for help. Petr PS: sorry for my english. I hope that you can understand my problem :-)
I was unable to get the feature to work with the suggestion on adding security so it does not have to be full trust (Aaron nAAS - Thursday, 9 Apr 2009 01:44) . Did anyone else get this to work? I added the following just above public class Action: SPLinkButton. Then followed your suggestion for creating the wsp using WSPBuilder. [System.Security.Permissions.ReflectionPermission(System.Security.Permissions.SecurityAction.Assert, Unrestricted = true)] [Microsoft.SharePoint.Security.SharePointPermission(System.Security.Permissions.SecurityAction.Assert, ObjectModel = true)] [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, Flags = System.Security.Permissions.SecurityPermissionFlag.Assertion | System.Security.Permissions.SecurityPermissionFlag.Execution)] Thanks for the help. Great feature Vince!
Has anyone managed to fix the issue shown below?? Monday, 13 Apr 2009 08:16 by AAron nAAs NOTE: I've noticed that when adding list web parts to a single page, and clicking around folders within those web parts, the "Up Folder" link gets confused and displays at inappropriate times. So, if you want to use this "Up Folder" feature (thanks Vince), make sure there is only one list per page.
As per previous comment - it also messes around with what is displayed in other webparts on the same page......
I have been trying to figure out how to re-create the wsp file after adding the fix for the up folder at the root. When I try to upgrade the solution I get an error.
Hi Vince i have install and deploy in Sharepoint site the *.wsp file that i have download. I don't see anything in SP, how can i do for show this Custom Action? Thanks in advance
I ran these commands: stsadm.exe -o addsolution -filename TheKid.CustomActions.Backup.wsp stsadm.exe -o deploysolution -name TheKid.CustomActions.Backup.wsp -allcontenturls -immediate -allowgacdeployment -force I can see the feature under Site Features. But I can't see it any of my sites. I would like the Up Folder button to appear in Document and Links lists. I have tried creating a new site. I don't see any errors but I am not sure what else too look for.
Hello Vincent, thanks for sharing this great code. I have a doubt, however, hope that you can help me. I deployed the WSP to an site that is in English and works like charm. If I try to activate it to a site in Spanish, it doesn't even appear in the feature selection list. What can I do about this? I already localized your code so it now shows properly in such language, but it doesn't seem to be available for a Spanish SharePoint... Thanks in advance, best regards.
The solution works in a strange way if there are two document libraries on the page. Initially it appears that it is working but if you do more testing you will see that the click on one back button effects the other. How do you resolve this.
thanks admin Are you really cool
Thank you so very much for this tutorial and taking the time to build this. The up button has helped me because I have so many folders and so much data inputed into the SharePoint site and it takes forever to click back to the top level of the site or doc library and navigate down tons of rows, thank you again, just what I was looking for!
Hello, great feature! I'm having a similar issue as some individulas in that if you add more than one library webpart to a page, the up folder button acts on all libraries and causes an error. Thank you, -Jeremy
All good stuff … My problem is I have created a feature to do this, and it works perfectly in WSS 3.0. I try it in MOSS SP1 and it never shows up either functionally or in the Site Collection Feature list. Tried it both on our test MOSS environment and our production. Disappears without a trace … Installs fine, activates fine via STSADM, shows up in some tools, but is missing in the Site Collection Feature list and most certainly doesn’t work … Can repeat the install successfully in WSS. Any ideas?
This works great and the users love it apart from a server error that is displayed if you try to go up a level when you are already at the top of the folder hierarchy. Is there anyway you could amend the solution so that it keeps a note of the level it is at and only allows the 'up' functionality to work if you are not at the top level? Thanks.
Is there any way that I can ad submenu under "UP" menu? As we have underneath "New" button on toolbar?
I am able to install WSP :) seems proper but when i navigate back displays to default (All Documents View) where it shows all folders in same level... iam also unable to download source code of this folder.. Please help me :-) download the full source
How do I build the source code?
Hello Vincent, Thanks for the very informative and enlightening document sharing with us. keep it up!
Hi Jerry, Great..I just have query that - How to add a listviewpart in a normal page and render the same webpart with different lists in where only list should be displayed based on query string. i have used WebPartPages:ListViewWebPart which is not showing all the features of sharepoint buit in list web part. Thanks Taranath
hey Vince, I installed the WSP package and everything installed ok I enable the site features but a don't see the up button appears do a have to do something else to let it work ? Any ideas to let i work ?
Thank you so much for giving out this information with the public.
Thanks Vince, I have successfully deployed your solution. However, I got 2 problems like some of them have already commented. 1. The "Up folder" button appears after transversing back to the top level. Upon clicking on the "Up folder" at the top level, all the documents are shown. I think this is a small issue to the user but good to recitfy 2. The solution does not really work for multiple document libraries in the same page. Upon clicking on the "Up folder", all the document libraries refresh and go back to the same level as the one clicked. Is there anyway to just target to only the particular list/document library? Once again, thank you very much for sharing. Hope the update will be out soon!
Thanks for writing such an out of the ordinary post related to "Adding an 'Up Folder' button to a SharePoint List View Webpart".
Great Vince , fantastic article which help me lots..after making little changes it become generic feature for n-number of subsites and sites After removing the hard coded value 2 and added the value which will generate only one at runtime by calculating the number of slashes in site Well Done Vince
Good but what Darren said on May 2nd. Are you planning a patch for this? Thx