{"id":2303,"date":"2018-12-10T15:26:31","date_gmt":"2018-12-10T23:26:31","guid":{"rendered":"https:\/\/developer.microsoft.com\/en-us\/office\/blogs\/?p=2303"},"modified":"2018-12-10T15:26:31","modified_gmt":"2018-12-10T23:26:31","slug":"modernize-your-sharepoint-pages","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/modernize-your-sharepoint-pages\/","title":{"rendered":"Modernize your SharePoint pages"},"content":{"rendered":"<h2>Modernization overview<\/h2>\n<p>SharePoint Online is continuously evolving and improving, which is a great thing for you as a consumer of the service. One of the key features is the availability of modern sites, which are modern Office 365 group-connected team sites or communication sites, combined with improved functionality that can be consumed from a beautiful, responsive, modern user interface. To learn more about modern checkout the <a href=\"https:\/\/support.office.com\/en-us\/article\/sharepoint-classic-and-modern-experiences-5725c103-505d-4a6e-9350-300d3ec7d73f?ui=en-US&amp;rs=en-US&amp;ad=US\">SharePoint classic and modern experiences<\/a> article and get inspired by the <a href=\"https:\/\/sharepointlookbook.azurewebsites.net\/\">SharePoint Look Book<\/a>.<\/p>\n<p>All of this is great, but you might ask yourself, <strong>I have lots of classic (team) sites&#8230;how do I bring them into the modern SharePoint world?<\/strong> The answer is (in-place) modernization: you can fully transform (or &#8220;modernize&#8221;) a classic site team sites into modern, optionally Office 365 group-connected, sites by following the SharePoint <a href=\"https:\/\/aka.ms\/sppnp-modernize\">modernization guidance<\/a>. Modernizing your sites involves one or more of the below steps:<\/p>\n<p><a href=\"https:\/\/aka.ms\/sppnp-modernize\"><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/transform\/media\/modernize\/modernize_overview_1.png\" alt=\"Modernization overview\" width=\"689\" height=\"369\" \/><\/a><\/p>\n<h2>Page modernization<\/h2>\n<p>Classic SharePoint sites typically have classic pages being wiki pages or web part pages and these pages cannot present themselves using a modern user interface, however, a classic site can host modern client-side pages. After you&#8217;ve maximized the use of the modern list and library user interface and optionally connected your site to an Office 365 Group, transforming the pages to modern client-side pages is the last task to fully transform your classic site into a modern site.<\/p>\n<h3>What does page modernization do?<\/h3>\n<p>Page modernization is done by transforming your classic wiki and web part pages into modern client-side pages. During the transformation the page structure (e.g. header with 2 columns) is kept, the wiki HTML is transformed into HTML that works on modern pages and the web parts on the pages are replaced by modern 1<sup>st<\/sup> party web parts. During this process the modern page is generated as a preview, the original page is never lost. You can, optionally, also have your end users decide on whether they want to keep the created page via an interactive banner:<\/p>\n<p><a href=\"https:\/\/aka.ms\/sppnp-pagetransformationui\"><img decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/transform\/media\/modernize\/pagetransformation_ui_6.png\" alt=\"Page transformation accept banner\" width=\"1232\" height=\"45\" \/><\/a><\/p>\n<h3>How to use it?<\/h3>\n<p>Page transformation can be used via PnP PowerShell, via the SharePoint UI and via .Net.<\/p>\n<h4>Modernizing pages via PnP PowerShell<\/h4>\n<p>As of the December 2018 version (3.4.1812.0) of <a href=\"https:\/\/aka.ms\/sppnp-powershell\">PnP PowerShell<\/a> transforming a classic wiki or web part page into a modern client-side page is as simple as calling the <strong>ConvertTo-PnPClientSidePage<\/strong> cmdlet:<\/p>\n<pre># Connect to the site with pages to modernize\nConnect-PnPOnline -Url <a href=\"https:\/\/contoso.sharepoint.com\/sites\/ateamsite\">https:\/\/contoso.sharepoint.com\/sites\/ateamsite<\/a>\n# Modernize page1.aspx and add the page keep\/discard banner on the page\nConvertTo-PnPClientSidePage -Identity page1.aspx -AddPageAcceptBanner<\/pre>\n<p>Learn more from <a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/transform\/modernize-userinterface-site-pages-powershell\">here<\/a>.<\/p>\n<h4>Modernizing pages via the SharePoint User Interface<\/h4>\n<p>If you want to give your end users the option to <strong>self-service modernize pages<\/strong> then using the SharePoint Page Transformation UI makes a lot of sense as it offers your end users UI extensions (ribbon buttons) to launch page transformation:<\/p>\n<p><a href=\"https:\/\/aka.ms\/sppnp-pagetransformationui\"><img decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/transform\/media\/modernize\/pagetransformation_ui_1.png\" alt=\"Page transformation UI banner button\" width=\"854\" height=\"178\" \/><\/a><\/p>\n<p>Learn more from <a href=\"https:\/\/aka.ms\/sppnp-pagetransformationui\">here<\/a>.<\/p>\n<h4>Modernizing pages via .Net<\/h4>\n<p>To modernize pages using .Net you start with installing the <a href=\"https:\/\/www.nuget.org\/packages\/SharePointPnPModernizationOnline\">SharePointPnPModernizationOnline NuGet package<\/a>. Once that\u2019s installed page transformation is as simple as below snippet:<\/p>\n<pre>var pageTransformator = new PageTransformator(clientContext);\nvar pages = clientContext.Web.GetPages();\nforeach (var page in pages)\n{\n\u00a0\u00a0\u00a0 PageTransformationInformation pt = new PageTransformationInformation(page)\n\u00a0\u00a0\u00a0 {\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ If target page exists, then overwrite it\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Overwrite = true,\n\u00a0\u00a0\u00a0 };\n\u00a0\u00a0\u00a0 pageTransformator.Transform(pt);\n}<\/pre>\n<p>Learn more from <a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/transform\/modernize-userinterface-site-pages-dotnet\">here<\/a>.<\/p>\n<h2>Resources<\/h2>\n<ul>\n<li><a href=\"https:\/\/aka.ms\/sppnp-modernize\">Modernization landing page<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/transform\/modernize-userinterface-site-pages\">Page transformation landing page<\/a><\/li>\n<\/ul>\n<p><span style=\"font-size: large\"><em>\u201cSharing is caring\u201d<\/em><\/span><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p><i>SharePoint Team, Microsoft &#8211; 10th of December 2018<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SharePoint Online is continuously evolving and improving, which is a great thing for you as a consumer of the service. One of the key features is the availability of modern sites, which are modern Office 365 group-connected team sites or communication sites, combined with improved functionality that can be consumed from a beautiful, responsive, modern user interface. All of this is great, but you might ask yourself, I have lots of classics (team) sites&#8230;how do I bring them into the modern SharePoint world? The answer is (in-place) modernization: you can fully transform (or &#8220;modernize&#8221;) a classic site team sites into modern, optionally Office 365 group-connected, sites by following the SharePoint modernization guidance. <\/p>\n","protected":false},"author":69078,"featured_media":2304,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365-developer"],"acf":[],"blog_post_summary":"<p>SharePoint Online is continuously evolving and improving, which is a great thing for you as a consumer of the service. One of the key features is the availability of modern sites, which are modern Office 365 group-connected team sites or communication sites, combined with improved functionality that can be consumed from a beautiful, responsive, modern user interface. All of this is great, but you might ask yourself, I have lots of classics (team) sites&#8230;how do I bring them into the modern SharePoint world? The answer is (in-place) modernization: you can fully transform (or &#8220;modernize&#8221;) a classic site team sites into modern, optionally Office 365 group-connected, sites by following the SharePoint modernization guidance. <\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/2303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69078"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=2303"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/2303\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/2304"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=2303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=2303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=2303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}