I have restricted a website to 2 custom page layouts created by me.

But since I did this, the new document button on the Pages Library is not directing me to the create page dialog, where I can select the layout, etc. it is directing me to the standard upload document. Does anyone know what is causing this and how to fix it?

2 Answers 2


I have found this also when changing/adding content types, it still defaults to upload by default.

Check the Content Types on the pages library and remove any which you don't need. Try setting the web part page as the default content type.

If that doesn't work (and this is critical), you could use javascript in a Script web part to redirect the New Document link to create a web part page. This question gives an example for sharepoint 2007.

  • I also thought of adding some javascript hackery, I was expecting a more OOB approach...I cannt add the web part page as the default content type because I want to restrict the content types to only one, the one associated with my custom page layouts.
    – Luis
    Dec 2, 2013 at 12:34

OK So I found the answer, as explained here:


All you have to do is to set the DocumentTemplate property of the content type to:


so in my case:

var pageCt = list.ContentTypes["MySitePageContentType"];
pageCt.DocumentTemplate ="/_layouts/CreatePage.aspx";

Since I am deploying via a feature event receiver, if you doing it via an xml maniphest:


        Name="my Publishing Content Type"
        Group="my Publishing Content Type"
        Description="Content Type inherited from Publishing Page"
            <FieldRef ID="{<GUID>}" DisplayName="Title" Name="Title" Sealed="TRUE" />
            <FieldRef ID="{<GUID>}" DisplayName="Description" Name="Comments" />
        <DocumentTemplate TargetName ="/_layouts/CreatePage.aspx"/>


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.