0

What I am doing is to set the Home.aspx as the Homepage for my TeamSite. I've added a Web Part as Script Editor and put the jQuery script as below to remove or hide the left menu and the Home. However, whenever I click on the Logo, the link has been changed to a path /_layouts/15/start.aspx#/, the menu still appears. Please give me some advice to address my problem.

  1. Did I work in the right way?
  2. Is it impossible to make a Home.aspx as a Home page?
  3. How can I change the link in the Logo when I click on that?

<script>
$(document).ready(function(){
    $("#sideNavBox").remove();
    $("#DeltaPlaceHolderMain .s4-die").remove();
    $("#pageTitle").remove();
});
</script>

1

2 Answers 2

0

You got the Minimal Download Strategy feature activated, that's what "ruining" your URL, and it's also why the page Title and the menu is still showing.

Head to Site Settings > Site Features and deactivate Minimal Download Strategy.

And you could hide the elements using CSS instead.

<style type="text/css">
#sideNavBox {
display: none;
}
#contentBox {
margin-left: 220px;
}
#s4-titlerow{ 
display: none !important;
}
</style>

Minimal Download Strategy overview

2
  • Thank you very much for you code. That works pretty well to me.
    – PMay 1903
    Commented Jun 30, 2015 at 14:08
  • 1
    Great! If you would like to make use of the whole page, just set #ContentBox to 20px instead of 220. This will give you a little more space to work with. :) Commented Jun 30, 2015 at 15:27
0

You need to disable the Minimal Download Strategy feature for the script to work right.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.