Set the _layouts page as your homepage in Sharepoint 2010

I am currently working on this project to create a SharePoint project portal, but the context is not a big deal. The problem is that all my pages are custom application pages and therefore they are in the _layouts folder. I would like each of these pages (http: // [server_name] / [project_name] /_layouts/Pages/Summary/Default.aspx] to be displayed whenever a user visits http: // [server_name] / [project_name] .

After searching for SP itself, the designer and Google, I could not find a solution. I thought ... let him try StackOverflow :-) Is it possible for the _layouts page to become the SP homepage?

+3
source share
3 answers

We cannot set the page (http: // [server_name] / [project_name] /_layouts/Pages/Summary/Default.aspx) on the welcome page of the website because this page is not part of our current site.

You can set the page to the welcome page of the website, which has part of our current website. To do this, you need to go to "Site Actions" → "Site Settings" → "Welcome Page" (in the "Look and Feel" section), set the page as a welcome page on which there is a part of our site. To do this, you have enabled the publication feature on the site.

+1
source

You can avoid checking this site using code.

SPFolder rootFolder = web.RootFolder;
rootFolder.Properties["vti_welcomepage"] = "any URL in layouts folder";
rootFolder.Update();``
0
source

. SharePoint 2013 Foundation. , .

:

1-In web.config :

<PageParserPaths>
        <PageParserPath VirtualPath="/*" CompilationMode="Always" 
            AllowServerSideScript="true" />
</PageParserPaths>

2. ( SharePoint Designer).

3-Edit the html code of your site page (the one that was created in step 2), including the server-side code as follows:

<%@ Page Language="C#" %>
<!DOCTYPE html>

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Redirect("http://sp-2013/_layouts/15/SharePointProject3_SearchApplicationPage/search.aspx");
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
</body>
</html>
0
source

Source: https://habr.com/ru/post/1778704/


All Articles