0

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:

mysite.com/projects/1/pro-1
mysite.com/projects/1/pro-2
mysite.com/projects/2/pro-3
mysite.com/projects/2/pro-4
mysite.com/projects/n/pro-5
mysite.com/projects/n/pro-n

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?

| improve this question | | | | |
0

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)

http://sharepointpals.com/post/An-introduction-to-Content-Type-Hub-in-SharePoint-Office-365


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

| improve this answer | | | | |
  • 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 '17 at 13:23
  • Then have a simple CEWP script (like in the second link) that loads you main script – Danny '365CSI' Engelman Mar 30 '17 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 '17 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.