Skip to main content
added 299 characters in body
Source Link
Christoffer
  • 9.9k
  • 3
  • 37
  • 53

I guess you could always use a site collection token in your URL.

~sitecollection

URLs and tokens in SharePoint 2013

If that don't work out for you, this blog post has a lot of great examples when working with masterpages and references. Use Site Url in SharePoint

Update

Try using a scriptlink instead. I'm unsure if encoding is needed thought. Try to have a blank space instead of %20 in /Style%20Library/.

<SharePoint:Scriptlink runat="server" Name="~sitecollection/Style%20Library/Custom JS/HideTreeViewFolder.js" Language="javascript" />

I guess you could always use a site collection token in your URL.

~sitecollection

URLs and tokens in SharePoint 2013

If that don't work out for you, this blog post has a lot of great examples when working with masterpages and references. Use Site Url in SharePoint

I guess you could always use a site collection token in your URL.

~sitecollection

URLs and tokens in SharePoint 2013

If that don't work out for you, this blog post has a lot of great examples when working with masterpages and references. Use Site Url in SharePoint

Update

Try using a scriptlink instead. I'm unsure if encoding is needed thought. Try to have a blank space instead of %20 in /Style%20Library/.

<SharePoint:Scriptlink runat="server" Name="~sitecollection/Style%20Library/Custom JS/HideTreeViewFolder.js" Language="javascript" />
Source Link
Christoffer
  • 9.9k
  • 3
  • 37
  • 53

I guess you could always use a site collection token in your URL.

~sitecollection

URLs and tokens in SharePoint 2013

If that don't work out for you, this blog post has a lot of great examples when working with masterpages and references. Use Site Url in SharePoint