SharePoint 2013 custom Layout page

Source: Internet
Author: User

In Sharepoint, we often need to customize login pages, error pages, and Access denied. I don't know how to operate them. I used to change or jump to the original page, in fact, Sharepoint provides powershell commands for us to modify these pages for our own layout pages.

For specific settings, you can modify the identity parameter of the powershell command. The parameters that can be modified mainly includeNone,Accessdenied,Confirmation,Error,Login,Requestaccess,SignoutOrWebdeleted.

 

Set the ing of the custom Layout page 

Set-SPCustomLayoutsPage -Identity <None | AccessDenied | Confirmation | Error | Login | RequestAccess | Signout | WebDeleted> -RelativePath <String> -WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

Delete the ing of the custom Layout page

Set-SPCustomLayoutsPage -Identity <None | AccessDenied | Confirmation | Error | Login | RequestAccess | Signout | WebDeleted> -Reset <SwitchParameter> -WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]

 

Parameters

Parameters Required Type Description

Identity

Yes

Microsoft. Sharepoint. Administration. spwebapplication. spcustompage

Specifies the custom Layout page to be set.

The entered value must be one of the following values:None,Accessdenied,Confirmation,Error,Login,Requestaccess,SignoutOrWebdeleted.

Relativepath

Yes

System. String

Specifies the path of the custom Layout page.

The entered value must be a valid path for the layout page, in the format of _ layouts/custompages/myaccessdenied. aspx.

Reset

Yes

System. Management. Automation. switchparameter

Set the null ing from the custom Layout page to null.

Webapplication

Yes

Microsoft. Sharepoint. powershell. spwebapplicationpipebind

The SharePoint web application that contains the custom Layout page.

The entered value must be a valid URL in the format of http: // SERVER_NAME; A valid guid in the format of 12345678-90ab-cdef-1234-567890bcdefgh; A valid name for a Sharepoint web application (for example, myofficeapp1); orSpwebapplicationObject instance.

Assignmentcollection

No

Microsoft. Sharepoint. powershell. spassignmentcollection

Manage objects for proper processing. UseSpwebOrSpsiteObjects may consume a large amount of memory, and using these objects in Windows powershell scripts requires proper memory management. UseSpassignmentObjects, which can be assigned to variables and then processed when they are not needed to release the memory. In useSpweb,SpsiteOrSpsiteadministrationIf you do not use the allocation set orGlobalParameters, these objects are automatically processed.

Note:
In useGlobalAll objects are included in global storage. If the object is not used immediately, or the object is not usedStop-spassignmentCommand to process objects, the memory may be insufficient.

Confirm

No

System. Management. Automation. switchparameter

You are prompted to confirm before executing the command. For more information, enter the following command:Get-help about_commonparameters

Whatif

No

System. Management. Automation. switchparameter

Displays a message describing the role of a command without executing the command. For more information, enter the following command:Get-help about_commonparameters


Example

Set-SPCustomLayoutsPage -Identity AccessDenied -RelativePath "/_layouts/customdenied.aspx" -WebApplication http://server

Map the specified path of the accessdenied layout page in the Web application (http: // server.

 

Summary

The project is not convenient. Let's take a look at the process. You can give it a try on your own. Now, let's get started ~~ Take a break ~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.