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

0

Correct me if I'm wrong so I can update my answer but it sounds like you're just trying to change the landing page for a specific team site to be Home.aspx?

There's two ways to approach this. Firstly, if you have publishing features enabled (documentation) then you can change the welcome page under

Site Settings -> Look and Feel

If not then you will need to download SharePoint designer 2013 and then open the site. Once you have opened the site click Site Pages in the left hand tree menu and then right click the page you would like to be your new Index and click Set as Home Page.

If you still want to remove the left hand bar I would also approach that with the following:

<script>
function remove(id)
{
    return (elem=document.getElementById(id)).parentNode.removeChild(elem);
}

remove("ms-titlebararea");
remove("s4-titlerow");
</script>
0

You have the minimal download strategy feature enabled, this is what generates /_layouts/15/start.aspx#/, simply deactivate this site feature. This should then allow your JavaScript code to execute more reliably.

As for your home page, click the Page tab in the ribbon of your desired home page and click Make Homepage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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