cancel
Showing results for 
Search instead for 
Did you mean: 

How to get current Site in Share Webscript

vamirr
Champ on-the-rise
Champ on-the-rise
I have a Share webscript that needs to know what site I'm currently on (if any). 

In 3.4 this used to work:


profile = context.properties["site-profile"];
currentSite = profile.shortName;

Since upgrading to 4.0.1, the above is no longer operable.  The docs do not show a similar method for doing so.
3 REPLIES 3

Not applicable
Hey Vamirr,

have a look at the documetation of the springsurf framework. Especially appendix C about the JavaScript API Reference is interesting for u (http://www.springsurf.org/sites/1.0.0.M3/spring-webscripts/spring-webscripts-documentation/reference...).

Hope it helps.

Greetings Christian

vamirr
Champ on-the-rise
Champ on-the-rise
Christian,

Thank you, that was helpful.

currentSite = page.url.templateArgs.site

nwali
Star Contributor
Star Contributor

How can I get current site name in pickerchildern.get.js ??

Please let me know.