문제

I was working on my project normally, doing deploy of the solution, but in a moment, after of last deploy, the URL of the solution was changed, the correct URL solution is "...sites/dev/SitePages/App/Pages/default.aspx" but after of the last deploy the URL change to*"...sites/dev/SitePages/App2/Pages/default.aspx"*, adding "2" in the solution name (App2).

I don't know what to do, I did not touch the URL in my code, I just added a new line of code, but I don't rename the solution name or something like that.

도움이 되었습니까?

해결책

Try this, in the master page

<script>
        var arrayUrl = _spPageContextInfo.webServerRelativeUrl.split('/');
        var siteUrl = arrayUrl[arrayUrl.length - 1];
</script>

Use that, and replace all "App Name" for "siteUrl" variable

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top