I have a document library with multiple level of folders and I only want the user to see the 'add item' button at the innermost level of each subfolder. I've placed the library in a webpart on the part and hidden the toolbar so there is no 'add item' button for that view. Is it possible to get the toolbar to 'turn back on' when they reach the level of folder they are allowed to add items to?


This is a fairly open question and not specific to any code but as far as solutions and without writing all the code for you...

  • After a given folder is displayed, you need to determine if it has children in order to show the Add Item button
  • You can use the SharePoint 2010 Client Object Model to detect this based on client context and JavaScript to perform the action
  • I recommend that instead of trying to write javascript that directly affects the toolbar, you simply use JavaScript to add an <a href="#">Add Item</a> and use native SharePoint Client Object Model to open a New Item dialog

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.