1

Using SharePoint Online as part of an enterprise Office 365 setup.

I'm trying to get my site to force the full URL string in the address bar when clicking the site name in the header. I need the full string to list because I have all my subsites using forms and links with relative urls.

This is the entire string in the address bar: enter image description here

If I click on the site title (where it says PAD Licensing) it will take me to the home page, but the URL in the address bar is friendly instead of the full URL. As a result, all my relative URL references don't work anymore.

enter image description here

Thank you for any help

1
  • I think I just need to find out how to disable the friendly URL from activating when clicking the header and force it to use the full URL? Commented Dec 19, 2017 at 18:34

2 Answers 2

0

It seems that you have set friendly URL in Site Settings > Term store management > Site Collection > Navigation: enter image description here

Find the term which points to the home page, change the Navigation Node Type from “Term-Driven Page with Friendly URL” to “Simple Link or Header”, provide the home page URL here.

enter image description here

1
  • That still didn't work; do I need to change it on every page in the collection or just the home page? Does it work for sub-sites? Commented Dec 21, 2017 at 16:44
0

The below code works - I inserted it in by using the "embed code" function at the bottom of each page. It's not perfect, but it is an effective workaround.

<script type="text/javascript">
  document.getElementById("ctl00_PlaceHolderSiteName_onetidProjectPropertyTitle1").onclick = function() {
    document.getElementById("ctl00_PlaceHolderSiteName_onetidProjectPropertyTitle1").href="/sites/snmc/strategicsupport/PADGeneric/pages/home.aspx"; 
  };
</script>
<script type="text/javascript">
  document.getElementById("ctl00_onetidProjectPropertyTitleGraphic").onclick = function() {
    document.getElementById("ctl00_onetidProjectPropertyTitleGraphic").href="/sites/snmc/strategicsupport/PADGeneric/pages/home.aspx"; 
  };
</script>

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.