Sp-dev-docs: SharePointFullPage hide from New<Pages<Apps

Created on 24 Apr 2019  路  7Comments  路  Source: SharePoint/sp-dev-docs

Category

  • [x] Question
  • [ ] Typo
  • [ ] Bug
  • [ ] Additional article idea

Question:

Is it possible to deploy a SPFX WebPart as "SharePointFullPage" without making it available to the user in the "New"-dialogue?

We often have use cases where we would like to deploy system pages similiar to application pages from Sharepoint OnPremise (_layouts). These pages should not be changed by users.

Currently we have to check for url parameters (e.g. ?applicationPage=UserEditor) and "hack" the dom of existing pages to show the system page.

The "SharePointFullPage" model would be a fantastic method to avoid these hacks. We then could just add links to the different application pages using __layouts/15/appPageHost.aspx?componentId=yourComponentGuidHere_ and set canUpdateConfiguration property to false.

The problem here is that users should not be able to create these system pages manually.

Needs spfx-general answered

Most helpful comment

If you don't want it to appear in any picker experience, then you'll want to have the supportedHosts entry, but have it be empty. You can still use the control if you configure it through the API, or by using the _layouts/15/apppagehost.aspx?componentid=asdfasdfasdf URL.

Does that solve your problem?

All 7 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

I don't think you can hide it from that dialog if you set the supportedHosts to SharePointFullPage... but what you could do is follow the steps in the docs to just add the web part to a page, then use the REST API (or POSH or O365 CLI) to convert the page layout to the one that is used as a full page.

I think this would give you the same net result + not making it available in the Apps dialog.

But you'd have to try it out... haven't confirmed this...

So in this case we would not set anything in supportedHosts at all and therefore the WebPart would not be visible in any of the areas (Page, Teams, App dialog)?

I'd think at minimum you'd need to make it a web part to get it to show up in the toolbox to get it added to a page.

if that doesn't work for you, I don't think your scenario is possible at this time... would make for a good uservoice feature request at https://aka.ms/sp-dev-uservoice

If you don't want it to appear in any picker experience, then you'll want to have the supportedHosts entry, but have it be empty. You can still use the control if you configure it through the API, or by using the _layouts/15/apppagehost.aspx?componentid=asdfasdfasdf URL.

Does that solve your problem?

Yes this sounds perfect. We will try this.

Thank you guys!

Edit: This worked perfectly and solve the problem.

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings