Showing posts with label SharePoint Designer. Show all posts
Showing posts with label SharePoint Designer. Show all posts

Mar 18, 2012

Inserting a web part into SharePoint page without designer

In the article “Inserting a web part into SharePoint Page without designer”, we have discussed about inserting a web part in New/Edit/Display from.aspx in without using designer the lower versions of SharePoint (WSS 3.0 and MOSS 2007).
Now, in this article we will discuss about inserting a web part into the New/Edit/Display form.aspx page without designer in SharePoint 2010.
Now, suppose that we have custom list named “City”
Now, go to the List Settings of the custom list “City”

Under General Settings -> Advanced Settings

In the advance settings, we have an option for the Launching the forms in dialog when click on NEW for inserting a new value in a list.
Here, now we will disable that option by selecting NO in launch forms in a dialog as shown below:



Now, we will click on “New Item” for inserting a new item in the custom list

Now, we will be navigated to the newform.aspx without popup dialog since we have disabled it.

The URL in the address bar will be as below:
In the above URL delete the URL before NewForm.aspx, we will have
In this URL in the address bar, append “?ToolPaneView=2”

Click Go in the address bar, then you will see the Add Web Parts option for inserting into the newform.aspx page.


In the similar way, we can insert the web part into editform.aspx and displayform.aspx

Mar 10, 2012

SharePoint Web Part Maintenance Page

In this post, we will come to know how to navigate to the web part maintenance page.

Why we need this page in SharePoint ?

In the webpart maintenance page, we will see the web parts present in a SharePoint page.
By adding “?contents=1” at the end of the page URL, you can navigate to the web part maintenance page.

For Example:

Here, you can see the web parts present in the SharePoint page and you can delete the web parts if it is corrupted or not used in the particular page.

Advantage:
There will be scenarios like; you will get an error while opening the SharePoint page in the SharePoint designer. Read this article to know more Deafult.aspx is not opening in the SharePoint Designer


Jan 3, 2012

How to Remove “+ Add document" from a SharePoint 2010 Document Library

In previous article, we have learned how to hide the Select/ Deselect Check Box from a view in the list/libraries.
In this post, we will see how to remove the + Add document” option from the document library in SharePoint 2010.
We will get some scenarios where, we will display the document library I different view and in that, we don’t want this option to be shown to the users. Because, it will allow the users to upload the documents.
Suppose the below is the document library where we want to hide the Add document option
 
We can achieve this by the following methods
1.   Editing the WebPart
2.   Using SharePoint Designer(CSS)
3.   Using J Query
4.   By Permission level(Default)

1. Editing the WebPart
Go to Edit WebPart -> Tool bar Type -> Select NoToolBar option which will hide the Add Document option
2. Using SharePoint Designer(CSS)
Go to the designer and edit the page/webpart where you want to hide. Search for class=”ms-addnew” and change the style to Style=”display:none”
3. Using J Query
Add a CEWP and link the following J-Query in it and hide the CEWP webpart
$(document).ready(function()
{
$(‘#WebPartWPQ2 .ms-addnew’).hide();
});
4. By Permission Level (Default)
We can set the permission level for the document library to read only and hence the user with read only option in the SharePoint site will not see this option
We will get the following result

Jan 1, 2012

How to hide the Select and Deselect Check box in a List/Library in SharePoint 2010

We might have faced some situations where you want to hide the Select and Deselect Option Check Box in the SharePoint 2010.
This is required, when you create some views and want to display some items with out check box options.
Let’s discuss about this in this article.
Suppose this is the document library where I want to hide the checkbox

Go to the Modify view in the Ribbon
You will see all the options for customizing the list\library. Click On the Tabular View.
Here you will find that, “Allow Individual Item Checkboxes” option is selected.
Unselect the Check Box and you are done. Now, you won’t see the Check Boxes in the list\Library as shown below
We can do this in SharePoint Designer also.
Go to the List/Library and then to the view where you want to hide the checkbox. Find the below section (.ms-WPHeaderTdSelection) and make this property to display equal to none.

.ms-WPHeaderTdSelection
{
Display:none;
}
That’s it. We have learned to hide the checkbox in lists and libraries of SharePoint 2010 using default settings and also using SharePoint designer 2010.

Dec 11, 2011

Displaying Multiple Document Libraries in a Single WebPart

A frequent requirement in the Share Point Projects is Displaying Multiple Libraries together in a single web part. It can be achieved by various methods but I am going to create it through Share Point Designer 2007.
In this article we will come to know how it can be done step by step.

1. The Important thing here to be noted is, whatever may be the number of Document Library going to be merged here, and it should contain the same number of columns and name.
2. If not, this web part won’t work.
3. Create two document libraries (Example : Test1,Test 2)
4. I have created 4 columns such as Type, Title, Name, and Created by in both document libraries.
5. Now, we are going to use the designer 2007 here to proceed.
6. Open the site in designer –> create an .aspx page.
7. In the right side of the designer -> go to Data Source Library -> Linked Sources
8. In the Linked Sources click -> create a New Linked Source.
9. We have Three Tabs here ,
General
a. In General -> Give the Name of the web part
b. In Description-> Give  the Description of your web part
c. In Key Words -> Give the Keywords if u like
Source
a. Click Configure Linked Source -> Pop up window will Show all the  Available Data Sources  as shown below
b. Under the SharePoint Libraries -> add the two document libraries created (Test1,Test 2)
c. Click Next Button


d. Leave the default option (Merger the contents of the data sources….)
e. Click Finish and it show it as shown below.
f. Click ok.
10. Now open the page where you want to add the web part in the designer. Then click “Click to insert a web part” option in the page.
11. In the Data Source Library under Linked Sources you will see the created (here I gave it as Multiple Document Libraries in Single List) the linked source as shown below.

12. Click on the Drop Down in the created Linked Source and click Show Data which will show the “Data Source Details” as shown below.
13. You will see all the columns present in the Document Libraries.
14. Press CTRL and select the columns which you want to display in the Web Part.
15. Then Click on the Insert Selected Fields as…  -> Select Multiple Item View
16. I have selected Name for Use in Forms, Created by and Path from the columns and inserted it in the site which is as follows.
17. We have to format this view so that it looks good to view.
a. First Column is formatted so that select the Format as with Label
b. Then second column  created by in the same way select Format as with Label
c. Finally third column select Format as with hyperlink and give the following the pop-up window.
     Address: /{@FileDirRef}
     Label: {@FileDirRef}
18. We have completed creating the web part. Finally it will look as shown below.


So we are now able to list and view the documents from two document libraries as shown below !!!

Dec 9, 2011

SharePoint Designer opens in contributor mode

We may face some situation, while editing the site using Sharepoint Designer, it will get open in Contributor mode and we will not be able to edit the site, eventhough we have the Site Collection Administrator(SCA) permission.
 By default, Contribute permissions are assigned to the Site Collection Members  group. Even though, we are part of SCA group, if we are member of Site Collection members the Designer will open in Contributor mode.
To overcome this just disable the contributor settings in SharePoint designer by using the below steps:
1. Open the site in SharePoint Designer.
2. Select the Site Tab -> Contributor Settings.
3. Click on Disable Contributor settings button.
Now we will be able to edit the site.

Nov 24, 2011

Deafult.aspx is not opening in the SharePoint Designer

PROBLEM: Deafult.aspx is not opening in the SharePoint Designer


Error Details   

     Soap: Server was unable to process request. A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered as safe on this site. You may not be able to open this page in an HTML editor that is compatible with Microsoft Windows SharePoint Services, such as Microsoft Office SharePoint Designer. To fix this page, contact the site administrator to have the Web Part or Web Form Control configured as safe. You can also remove the Web Part or Web Form Control from the page by using the Web Parts Maintenance Page. If you have the necessary permissions, you can use this page to disable Web Parts temporarily or remove personal settings. For more information, contact your site administrator.


Solution       

The problem is that the default.aspx page may contain some error web parts which can be removed by hitting the following url


This will open the web part maintenance page. So, here you can delete the error web part.


SharePoint Designer opens in Contributor mode.

We may face some situation, while editing the site using Sharepoint Designer, it will get open in Contributor mode and we will not be able to edit the site, eventhough we have the Site Collection Administrator (SCA) permission.


By default, Contribute permissions are assigned to the Site Collection Members group. Even though we are part of SCA group, if we are member of Site Collection members the Designer will open in Contributor mode.


To overcome this just disable the contributor settings in SharePoint designer by using the below steps:

1. Open the site in SharePoint Designer.

2. Select the Site Tab -> Contributor Settings.

3. Click on Disable Contributor settings button.


Now we will be able to edit the site.