All I am trying to do is to remove the right zone of this site. How do I accomplish this? Is there any site in SharePoint that doesn't have zones?
4
votes
4 Answers
8
votes
Web Part Zones are part of the Page Layout that your page instance is using. To remove a Web Part Zone you can:
- Edit the page in SharePoint Designer. Before placing the page into edit mode, SharePoint Designer will ask if you want to detach from the Page Layout. Once you do, you can now format the page however you would like.
- Create a custom Page Layout based on the out of the box Page Layout with the right zone removed. After your custom Page Layout is deployed or uploaded, you can associate your page with that layout.
- Hide the zone with custom CSS. The easiest way to do this is to add a Content Editor Web Part onto your page with the CSS to hide the zone.
3
votes
On the content Editor just insert the following and it works:
<script>
function HideWebPartZone()
{
var x = document.getElementsByTagName("TD")
var i=0;
for (i=0;i<x.length;i++)
{
if (x[i].width=="70%")
{
// left column
x[i].style.width="100%";
// center (otherwise empty) column
var x2=x[i].nextSibling;
x2.style.width="0";
x2.style.display="none";
x2.innerHTML="";
// right column
x2=x[i].nextSibling.nextSibling;
x2.style.width="0";
x2.style.display="none";
x2.innerHTML="";
// right margin column
x2=x[i].nextSibling.nextSibling.nextSibling;
x2.style.width="0";
x2.style.display="none";
x2.innerHTML="";
//all done
return;
}
}
}
_spBodyOnLoadFunctionNames.push("HideWebPartZone")
</script>
1
votes