5

For some reason, one of my web parts is showing the "+ Add Document" link at the bottom of the web part as opposed to the new "+ New Document or drag document here" link at the top. The toolbar setting is set to Full Toolbar on both. Any ideas why this might be happening? They're both OOTB webparts for library views.

Web Part Screen Shot

  • I would guess one is for 2010, no idea why. Try exporting the Web Part and see if the assembly is set to version 14 instead of 15 – eirikb May 1 '14 at 19:00
  • Agreed. I haven't seen 'Add document' in 2013 – Colbs May 1 '14 at 19:00
  • 2
    Do you know if this library has been upgraded from SharePoint 2010, I have seen this behavior when your list/library definition contains old specifications. – Sudhir Kesharwani May 1 '14 at 19:16
  • I've seen this weird behavior when deploying a web part for a document library to the home page of a SharePoint-hosted add-in. I believe I saw a reference somewhere that this was a bug in the SharePoint add-in deployment code but I am not 100% sure about that. – DmytroL Sep 24 '17 at 6:38
2

As @Vadim already mentioned in his answer, it's all about the rendering mode of the selected view. However, Vadim is slightly off about the JSLink part, so let me clarify things a bit.

SharePoint 2013 introduced a new feature called "client-side rendering" (CSR), while SharePoint 2007/2010 only offered "server-side rendering" (SSR).

By default every newly created view on a list is using CSR in SP2013. However, there are several ways to switch to SSR. One option, as Vadim mentioned, is to change the WebPart properties or use server-side code to force a WebPart to use SSR.

Another option is to customize a view with SharePoint Designer (by converting to an "XSLT DataView").

A third option, and obviously the less known one, is to create a new standard view via a Web browser and switch the view style to anything other than "Default".

This will force the view to become SSR, because all those view styles are actually XSLT-based (as they have been in SharePoint 2007/2010 already).

The indicator if it is a SSR or CSR is, as you already discovered on your own, is how and where the "Add document" / "new document" option is displayed.

"Add document" at the bottom of a WebPart view is indicating a SSR, while "new document or drag files here" is an indicator for a CSR.

The part where @Vadim is slightly off is that even if you are customising a CSR with JSLink it will not turn your view into a SSR.

TL;DR Your first WebPart has either been switched on the properties pane to become server rendered, or you applied a customized view.

1

Possible reasons:

  • SharePoint 2010 compatible Rendering Mode is enabled. Make sure XsltListViewWebPart.ServerRender property is set to False (under Miscellaneous group - Server Render property)

  • Customized List View is rendered. Make sure that not a custom view template is set via JSLink property (under Miscellaneous group - JS Link property)

0

I'm sure you've already figured this out since it's so old. However just in case someone else has the question.... I do know that when the list view style is set to "Newsletter", the Add document appears below the list. Try changing it default or another style.

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.