Skip to content

Sharepoint create modern page from template via url #10150

Closed

Description

@diabhoil

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

Issue description

Is there a parameter for "/_layouts/15/CreateSitePage.aspx" or "/_layouts/15/CreatePageFromTemplate.aspx" to create the page directly giving the source template?

I do not want the user to chose a template or create the blank page. I have found that we can use for example "/_layouts/15/CreateSitePage.aspx?promotedState=1" to directly create a news page. But can I have something like "Create a news page with this specific template"?

Activity

  1. Ashlesha-MSFT commented on Mar 12, 2025

    @Ashlesha-MSFT
    Contributor

    Hello diabhoil,
    Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.

  2. Ashlesha-MSFT commented on Mar 13, 2025

    @Ashlesha-MSFT
    Contributor

    diabhoil,
    No, there is no URL parameter that allows specifying a specific page template directly.
    you can achieve this using:
    1.SharePoint REST API
    2. PnP PowerShell -- https://pnp.github.io/powershell/cmdlets/Copy-PnPFile.html
    3. Power Automate -- https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview

    No, there is no URL parameter that allows specifying a specific template when using /_layouts/15/CreateSitePage.aspx. The ?promotedState=1 parameter can only create a blank news page but does not let you choose a custom template

  3. diabhoil commented on Mar 13, 2025

    @diabhoil
    ContributorAuthor

    Ashlesha-MSFT thank you for the answer. So there is currently no way to change the url in the content type settings to something that the page will automatically created from a template?

    Image

    I guess a possible way would be to create a SPFX solution, put it on a page, set the url in the content type to the page with an parameter telling the webpart/extension to create a new page via REST API. Seems like a very hacky workaround to me.

  4. Ashlesha-MSFT commented on Mar 14, 2025

    @Ashlesha-MSFT
    Contributor

    diabhoil,
    We appreciate your input. To ensure your idea is considered for future updates, we recommend submitting it through the https://feedbackportal.microsoft.com/feedback/forum/06735c62-321c-ec11-b6e7-0022481f8472. Feature requests are reviewed by the engineering team and may be prioritized based on various factors, including the number of requests received.
    Thank you for your valuable suggestion!

  5. VesaJuvonen commented on Nov 3, 2026

    @VesaJuvonen
    Contributor

    This issue is more than 12 months old and has not had recent activity. We are cleaning up the backlog so we can manage incoming reports more efficiently. If the issue is still relevant, please submit a new issue with updated details and current reproduction steps. We apologize for any inconvenience caused by this updated process, and thank you for being part of the SharePoint developer ecosystem.

  6. github-actions commented on Nov 3, 2026

    @github-actions

    Thank you for taking the time to file an issue. We periodically archive older or inactive issues as part of our issue management process, which automatically closes them once they are archived.

    If you’d like to understand more about why and how we handle archived (closed) issues, please see Our approach to closed issues.

    We appreciate your contribution and if this is still an active issue with the latest SPFx versions, please do resubmit the details. We needed to perform a cleanup, so that we can start with a clean table with a new process. We apologize for the inconvenience this might cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions