SOLVED

How to correctly avoid getting "The current page has been customized from its template"

Iron Contributor

We are using Sharepoint Online and wish to apply our own CSS in the Site Pages and Wiki Pages. We understand that changes to the Master page is not recommended!

 

We have tried to modify Site Pages and Wiki Pages directly, but then we get a message in the page "The current page has been customized from its template. Revert to template." which is visible to all users

 

What is the template that is mentioned?
How to correctly apply our own styling/CSS to the pages?


Thank you in advance for any ideas :)

   John

5 Replies
You could this using jslink or do it via the sitesettings and select a css file. Which file is ghosted you have to check with SharePoint Designer.
best response confirmed by Beau Cameron (MVP)
Solution
To me the answer here is to use JavaScript / CSS injection pattern...but only with the classic UI. With the new UI we still need to know / learn how to do it

@John Aage Andersen 

 

try this in powershell

 

Get-SPOSite <SiteURL>|select DenyAddAndCustomizePages

 

- to see if its enabled. if enabled, run this:

 

Set-SPOSite <SiteURL> -DenyAddAndCustomizePages 0 

Agree with @Juan Carlos González Martín here.

The "Template" is referring to a page layout (basically a definition of what a page should look like).  However, as Juan mentions, you should keep your customization loosely coupled to the pages, and inject references to your CSS into the page through JavaScript. This can be done via User Custom Actions.

@Juan Carlos González Martín 

 

if you want to remove the message from modern sites use the powershell I provided. This was given to me from MS support and it works.

1 best response

Accepted Solutions
best response confirmed by Beau Cameron (MVP)
Solution
To me the answer here is to use JavaScript / CSS injection pattern...but only with the classic UI. With the new UI we still need to know / learn how to do it

View solution in original post