Вопрос

Is it possible to add a webpart to a page using Sharepoint Designer 2010. I'm trying to modify the newform.aspx page of a list to add a Content Editor Webpart into it. I can't find any way to do that in Sharepoint designer.

Это было полезно?

Решение

You can actually do it through the UI, which avoids "customizing" the page. I have an old blog post for 2007, but the process is the same in 2010.

Go to your newform.aspx (ie: http://sharepoint.corp.local/lists/mylist/newform.aspx), and append "?ToolPaneView=2" to the end of the URL (ie: http://sharepoint.corp.local/lists/mylist/newform.aspx?toolpaneview=2). The form will open with the ability to add web parts. In my experience, this never seems to work correctly unless you do it using Internet Explorer, but it does work in IE, and saves you from customizing the page in SPD.

This is my preferred approach if I need to add CEWP's or other web parts to a form as it's far less likely to have issues with future upgrades than customizing the page.

Obviously, once you have your CEWP, just point it to your script file and you're good to go. I use this approach all the time for adding jQuery enhancements to forms.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top