I hope everyone is well.
Currently I'm stuck on HTML pathing, in short I want to always be taken back to "SignIn" page when I log out from anywhere on Dyanimcs CRM Portals. My current customised Web Template "Header" functionality does the following.
1. Logs users out from the CRM portal and takes them to the Sign In page, when they are in 1 url path i.e. "Home/1URL/" i.e. https://test.microsoftcrmportals.com/support/ OR https://test.microsoftcrmportals.com/profile/ click sign out it, logs me out and does take me to https://test.microsoftcrmportals.com/SignIn which is all correct.
2. However when their are 2 URLS now i.e. https://test.microsoftcrmportals.com/support/edit-case/ "Home/1URL/2URL/" my logic breaks and throws and error, not logging the user out, it basicaly does not recognise the 2URL not being able to find the page.
How do I always tell to my code to always root to home then SignIn url, because currently my code gets confused when its in multiple paths i.e. like the above?
My web template header code below:
{% assign homeurl = website.adx_partialurl %}
<a role="menuitem" aria-label="{{ snippets["links/logout"] | default:resx["Sign_Out"] | escape }}"
href="{% if homeurl%}/{{ homeurl }}{% endif %}Account/Login/LogOff?returnUrl=/SignIn"
title="{{ snippets["links/logout"] | default:resx["Sign_Out"] | escape }}">
{{ snippets["links/logout"] | default:resx["Sign_Out"] | escape }}