Skip to content

Set script src to the host web#9

Open
ciphertxt wants to merge 1 commit intojohnnliu:masterfrom
ciphertxt:tokenfix
Open

Set script src to the host web#9
ciphertxt wants to merge 1 commit intojohnnliu:masterfrom
ciphertxt:tokenfix

Conversation

@ciphertxt
Copy link
Copy Markdown

Set's the script src to the host web by default instead of the site
collection. (Issue #8)

Set's the script src to the host web by default instead of the site
collection. (Issue johnnliu#8)
@johnnliu
Copy link
Copy Markdown
Owner

there's actually an additional place with ~sitecollection to be replaced with ~site to complete this change.

I'm going to take this a step further and let people choose whether to use ~site or ~sitecollection if they choose to in the script-url.

Choosing ~sitecollection and using a folder at the rootweb level is better from the siteadministrator's point of view. But ~site is better if it's a site owner's point of view. I'd like to support both.

@ciphertxt
Copy link
Copy Markdown
Author

Supporting both is great. In many cases they site administrator is also the site owner in many orgs, so providing both gives that flexibility.

Feel free to discard this PR if it needs additional tweaks.

@Danny-Engelman
Copy link
Copy Markdown

I do not know if this is relevant for your tool. There are more ~tokens : https://msdn.microsoft.com/en-us/library/office/jj163816.aspx

@ciphertxt
Copy link
Copy Markdown
Author

I believe what @johnnliu is talking about is effectively replicating a subset of those tokens and replicating that login in the methods that set the scripts. From that list the only 2 that are really needed are ~site and ~sitecollection as this isn't an add-in and the scripts wouldn't be hosted in an app web.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants