Skip to main content

Posts

Showing posts from January, 2016

Hide top navigation and quick launch in SharePoint 2013

Hide top navigation and quick launch in SharePoint 2013, < style type = "text/css" > .main-topbar , #siteIcon , .search-area , #s4-titlerow , #sideNavBox {display:none !important;} #contentBox {     margin-left: 0; } div #s4-ribbonrow {     height: auto !important;     margin: 0; } #ActionDiv a {     background: #f1f1f1 none repeat scroll 0 0;     border: 1px solid #ccc;     display: inline-block;     margin-bottom: 5px;     margin-right: 4px;     padding: 3px 8px !important;     text-align: center; } #ActionDiv {     text-align: left; } </ style > Hope this helps!!!

Article page showing HTML tags in SharePoint 2013

Article page showing HTML tags, use below PowerShell to fix as mentioned here : http://labs.steveottenad.com/publishing-columns-show-escaped-html-in-sharepoint-2010/ Add-PSSnapin "Microsoft.SharePoint.PowerShell" $web = Get-SPWeb "https://contoso.com/sites/mysite/it/" $list = $web.GetPublishingPages(); foreach ($page in $list.Items) {     if ($page.Title -eq "Testing123")     {         [Microsoft.SharePoint.Publishing.Fields.HtmlField]$field = [Microsoft.SharePoint.Publishing.Fields.HtmlField]$list.Fields[“Page Content”]         $field.RichText = $true         $field.RichTextMode = [Microsoft.SharePoint.SPRichTextMode]::FullHtml         $field.Update()         break;     } } $list.Update() $web.dispose() Hope this helps!!!

How to move list paging in top right corner in SharePoint 2013

Add script editor web part and paste the below code to move list paging in top right corner in SharePoint 2013, < script type = "text/javascript" > $ ( document ).ready( function () {   var header = $ ( "table.ms-listviewtable" );   var table = $ ( "#bottomPagingCellWPQ3" );     if (header & & table)     {         table. insertBefore (header);         $ ( "#bottomPagingCellWPQ3" ).css( 'text-align' , 'right' );     }     else     {         alert ( 'jQuery did not found Elements.' );     } }); </ script > < style type = "text/css" > td #bottomPagingCellWPQ3 {float:right} </ style > Hope this helps!!!

Apply page layout for a particular page in SharePoint 2013 using PowerShell

In this article we will see how to apply page layout for a particular page in SharePoint 2013 using PowerShell, $spWeb = Get-SPWeb("https://server.com/sites/MyWeb") $spFile = $spWeb.GetFile("https://server.com/sites/Pages/MyPage.aspx") $spFile.CheckOut("Online",$null) $spFile.Properties["PublishingPageLayout"] = "/sites/_catalogs/masterpage/PageLayout.aspx" $spFile.Update() $spFile.CheckIn("Update page layout via PowerShell",[Microsoft.SharePoint.SPCheckinType]::MajorCheckIn) $spWeb.Dispose() Hope this helps!