I would like to open a New Item Form inside a Dialog. For this approach I'm using the following code:
<script type="text/javascript">
string SiteUrl = SPContext.Current.Site.Url
function displayLayover(url) {
var options = SP.UI.$create_DialogOptions();
options.url = url;
options.dialogReturnValueCallback = Function.createDelegate(
null, null);
SP.UI.ModalDialog.showModalDialog(options);
}
</script>
It works totally fine but now I would like to get the link of the current subsite, because the goal is to save the subsite as template and don't change the script manually inside the Script Editor.