I'm creating a Page that contains a CEWP which will link to an HTML file.

The plan is to template that site/page and use it across multiple sites and collections.

I want to link the HTML from 1 location so if we need to make an update across all sites, it can be done from said 1 location.

However, there's a new site collection created after a certain threshold so the link can't be in that path. For example:


Given this structure, the HTML file that the CEWP link to cannot be on /projects/1-n

I want to create something like mysites.com/cdn/home/SiteAssets/custom.html and use that link across all those sites above to link to the CEWP and make changes in one place.

Any suggestions?

1 Answer 1


SharePoint has the ability to a create a ContentTypeHub

The name is totally wrong, as it can do much more than just manage ContentTypes centrally

Basically it is a Site Collection where all users have access to

and you can store any files you want in a Document Library on that ContentTypeHub

So you can use it as your Company CDN (Content Delivery Network)


If you mean your filenames are changing, an option might to to load your JS file dynamically with:

  • The file names aren't changing. The issue is that the CEWP does not allow (by default) to link to a file outside of the Site Collection. So creating a content type hub is a good idea as a central location for code distribution but I don't think it would fix the issue with CEWP
    – Batman
    Mar 30, 2017 at 13:23
  • Then have a simple CEWP script (like in the second link) that loads you main script Mar 30, 2017 at 15:32
  • oh okay, what I could do is export the webpart and add in that script that loads my .js file from the repository. I'll give that a shot. Thx
    – Batman
    Mar 30, 2017 at 17:09

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.