{"id":61,"date":"2015-07-26T00:59:00","date_gmt":"2015-07-26T00:59:00","guid":{"rendered":"https:\/\/bangimportant.itgroove.net\/?p=61"},"modified":"2023-02-24T21:39:42","modified_gmt":"2023-02-24T21:39:42","slug":"sharepoint-centered-layout-in-wiki-pages","status":"publish","type":"post","link":"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/","title":{"rendered":"SharePoint Centered Layout in Wiki Pages"},"content":{"rendered":"<p>In a recent project, we were working with a customer who was using a fixed width centered design in their corporate intranet (using the Publishing feature&#8217;s &#8220;\/Pages&#8221; library and the Site Master Page), but the System Pages of the site were still full width. Since wiki libraries use the System Master Page, they were full width and did not fit with the rest of the pages in the centered design site. <\/p>\n<p>We preferred to leave the System Master Page as full width, and so we came up with another method to apply a fixed width to the wiki pages in the intranet site. <\/p>\n<h2>The Solution<\/h2>\n<p>We added a bit of jQuery to our global scripts file in our custom System Master Page. The script checks if the current page URL contains the path to the wiki libraries on the site, and if so, appends the fixed width stylesheet. We gave the customer instructions on how to update the script file to add more wiki libraries if necessary down the road.<\/p>\n<p>[code lang=&#8221;js&#8221;]<\/p>\n<p>$(document).ready(function() {<br \/>\n    \/\/ Check the page URL and if it matches any of these, add the Intranet centered stylesheet<br \/>\n    if ((window.location.href.indexOf(&quot;\/SitePages&quot;) &gt; -1) || (window.location<br \/>\n        .href.indexOf(&quot;\/PoliciesAndGuidelines&quot;) &gt; -1) || (window.location<br \/>\n        .href.indexOf(&quot;\/ZooBranding&quot;) &gt; -1)) {<br \/>\n        $(&quot;head&quot;).append($(<br \/>\n            &quot;&lt;link rel=&#8217;stylesheet&#8217; href=&#8217;\/_catalogs\/masterpage\/CustomBranding\/Styles-Intranet.css&#8217; type=&#8217;text\/css&#8217; media=&#8217;screen&#8217; \/&gt;&quot;<br \/>\n        ));<br \/>\n        \/\/ Bring back the quick launch<br \/>\n        $(&quot;#sideNavBox&quot;).css(&quot;display&quot;, &quot;block&quot;);<br \/>\n        $(&quot;#contentBox&quot;).css(&quot;float&quot;, &quot;right&quot;);<br \/>\n        \/\/ Stop wiki from spilling over right side<br \/>\n        $(&quot;#layoutsTable&quot;).css(&quot;width&quot;, &quot;auto&quot;);<br \/>\n        $(&quot;#ctl00_PlaceHolderMain_WikiField&quot;).css(&quot;width&quot;, &quot;716px&quot;);<br \/>\n        $(&quot;.ms-webpart-zone.ms-fullWidth&quot;).css(&quot;width&quot;, &quot;716px&quot;);<br \/>\n        \/\/ Stop the full width layout from flashing<br \/>\n        setTimeout(function() {<br \/>\n            $(&quot;#s4-workspace&quot;).show();<br \/>\n        }, 500);<br \/>\n    } else {<br \/>\n        $(&quot;#s4-workspace&quot;).show();<br \/>\n    }<br \/>\n});<\/p>\n<p>[\/code]<\/p>\n<p>Now we have a centered design in the intranet site as well as it&#8217;s wiki libraries, while leaving the System Master Pages untouched.<\/p>\n<h2 class=\"hide\">sharepoint centered layout<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>In a recent project, we were working with a customer who was using a fixed width centered design in their corporate intranet (using the Publishing feature&#8217;s &#8220;\/Pages&#8221; library and the Site Master Page), but the System Pages of the site were still full width. Since wiki libraries use the System Master Page, they were full &hellip; <a href=\"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/\"><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[2,3,5,7,8,9],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SharePoint Centered Layout in Wiki Pages - Archive<\/title>\n<meta name=\"description\" content=\"SharePoint centered layout added to wiki libraries without changing the System Master Page.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SharePoint Centered Layout in Wiki Pages - Archive\" \/>\n<meta property=\"og:description\" content=\"SharePoint centered layout added to wiki libraries without changing the System Master Page.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/\" \/>\n<meta property=\"og:site_name\" content=\"Archive\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-26T00:59:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-24T21:39:42+00:00\" \/>\n<meta name=\"author\" content=\"Matt Lonpre (Alumni)\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matt Lonpre (Alumni)\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/\",\"url\":\"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/\",\"name\":\"SharePoint Centered Layout in Wiki Pages - Archive\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/archive\/#website\"},\"datePublished\":\"2015-07-26T00:59:00+00:00\",\"dateModified\":\"2023-02-24T21:39:42+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/archive\/#\/schema\/person\/0deb86ff016aebc76f86a79a0e7236d0\"},\"description\":\"SharePoint centered layout added to wiki libraries without changing the System Master Page.\",\"breadcrumb\":{\"@id\":\"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog Archive\",\"item\":\"https:\/\/regroove.ca\/archive\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SharePoint Centered Layout in Wiki Pages\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/archive\/#website\",\"url\":\"https:\/\/regroove.ca\/archive\/\",\"name\":\"Archive\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/archive\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/archive\/#\/schema\/person\/0deb86ff016aebc76f86a79a0e7236d0\",\"name\":\"Matt Lonpre (Alumni)\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/archive\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f084e0ef8fd6992834b5b085b737a7a2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f084e0ef8fd6992834b5b085b737a7a2?s=96&d=mm&r=g\",\"caption\":\"Matt Lonpre (Alumni)\"},\"url\":\"https:\/\/regroove.ca\/archive\/author\/mlongpre\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SharePoint Centered Layout in Wiki Pages - Archive","description":"SharePoint centered layout added to wiki libraries without changing the System Master Page.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/","og_locale":"en_US","og_type":"article","og_title":"SharePoint Centered Layout in Wiki Pages - Archive","og_description":"SharePoint centered layout added to wiki libraries without changing the System Master Page.","og_url":"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/","og_site_name":"Archive","article_published_time":"2015-07-26T00:59:00+00:00","article_modified_time":"2023-02-24T21:39:42+00:00","author":"Matt Lonpre (Alumni)","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Matt Lonpre (Alumni)","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/","url":"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/","name":"SharePoint Centered Layout in Wiki Pages - Archive","isPartOf":{"@id":"https:\/\/regroove.ca\/archive\/#website"},"datePublished":"2015-07-26T00:59:00+00:00","dateModified":"2023-02-24T21:39:42+00:00","author":{"@id":"https:\/\/regroove.ca\/archive\/#\/schema\/person\/0deb86ff016aebc76f86a79a0e7236d0"},"description":"SharePoint centered layout added to wiki libraries without changing the System Master Page.","breadcrumb":{"@id":"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/regroove.ca\/archive\/2015\/07\/26\/sharepoint-centered-layout-in-wiki-pages\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Archive","item":"https:\/\/regroove.ca\/archive\/"},{"@type":"ListItem","position":2,"name":"SharePoint Centered Layout in Wiki Pages"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/archive\/#website","url":"https:\/\/regroove.ca\/archive\/","name":"Archive","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/archive\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/archive\/#\/schema\/person\/0deb86ff016aebc76f86a79a0e7236d0","name":"Matt Lonpre (Alumni)","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/archive\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f084e0ef8fd6992834b5b085b737a7a2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f084e0ef8fd6992834b5b085b737a7a2?s=96&d=mm&r=g","caption":"Matt Lonpre (Alumni)"},"url":"https:\/\/regroove.ca\/archive\/author\/mlongpre\/"}]}},"_links":{"self":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts\/61"}],"collection":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":1,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":2792,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/posts\/61\/revisions\/2792"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/media?parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/categories?post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/archive\/wp-json\/wp\/v2\/tags?post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}