Question

  • I'd like to apply a custom master page to a subsite.

  • The intent is simply to attach the jQuery library and a loader script to the master page. I have full control to all subsites.

Strict limitations

  1. SP designer is blocked in my environment
  2. I only have read access to the site collection's master page gallery. I'm not a site collection admin.
  3. The publishing feature isn't active for the site collection, but is active for subsites, including my test site.

Steps Taken

  1. I created a copy of seattle.master from the subsites Master Page Gallery. I added the 2 script lines, and uploaded it back to the subsite Master Page Gallery. (Renamed SeattleV2.aspx).

  2. SeattleV2 isn't one of the drop-downs available on the /_layouts/15/ChangeSiteMasterPage.aspxpage.

  3. I don't have the option to publish a master page; the publish option is greyed out on subsites.

(note: I'm Site Collection Admin of a different collection in the same environment and the publish option is disabled for subsites there as well. It's only active on the root master page gallery).

  1. Directly editing the subsites seattle.master doesn't work even when it set to inherit from it's parent site. It appears to still use a copy of the root Site's seattle.master, instead of the subsites.
Était-ce utile?

La solution

If you want to load a couple of JS files

Then forget about injecting stuff in MasterPages and use User Custom Actions

(only been around since 2010):

http://johnliu.net/blog/2015/12/the-safest-future-proof-way-to-brand-your-sharepoint-and-sharepoint-online

And instead of Johns ASPX file,

use a Chrome Extension to just apply content to any SP site

https://github.com/tavikukko/Chrome-SP-Editor

iSPE

Autres conseils

You can't publish because you have to activate the Publishing Feature in site collection features. Follow these steps.

  1. Go to Site Settings of root site. Then Go to Site Collection Features

  2. Activate this Feature: SharePoint Server Publishing Infrastructure

  3. Go to the Subsite -> Site Settings -> Site Features

  4. Activate this feature: SharePoint Server Publishing

  5. Then upload your edited master page to Master Page Gallery and use it.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top