Forum Discussion
New Page layout include page title and name.
I’ll start by saying I’m not a developer, so apologies, but I raised a supported call as told it was a development issue so they couldn’t help.
Scenario…
When using the Design Manager (SharePoint Online) to create a custom page layout, the resultant page includes the page Name and Page Title in the layout.
This does not occur with the default layouts, and there doesn’t appear to be a way to remove the page name field, it doesn’t appear as a control in page layout html template?
To reproduce the issue,
- Simply create a new page layout using Design Manager in a Publishing site.
- Do not edit the html page.
- Publish the layout,
- Create a new page and select the newly created layout. ( give the page a title, ‘name with spaces 1’, this creates a page name name-with-spaces-1
- Save and view the page, with the new layout..
The problem is, now at the top of the viewed page you’ll see both page Title and page Name.. so you get name with spaces 1 and name-with-spaces-1 displayed… This doesn’t occur with default page layouts.
Microsoft gave me the following code snippet, BUT this removes both Title and Name.
<script type="text/javascript"> document.getElementById('DeltaPlaceHolderPageTitleInTitleArea').style.display = 'none'; </script>
How do I go about removing the Page Name from the layout, permanently for subsequent new pages.
Thanks in advance .
Russ
One way to remove it, is by downloading your Page Layout HTML file first. You can download from the "Edit Page Layouts" screen in Design Manager. Then open this file in your favorite HTML editor (Notepad for example...). Look for the code below and remove it. Then save your file and upload it back. You can drag and drop from your file system onto the "Edit Page Layouts" screen in Design Manager. Publish the Page Layout and your change should be visible everywhere the Page Layout is used and also for future pages.
Hope this helps!
<!--SPM:<SharePoint:SPTitleBreadcrumb runat="server" RenderCurrentNodeAsLink="true" SiteMapProvider="SPContentMapProvider" WelcomePageUsesWebTitle="false">--> <!--SPM:<PATHSEPARATORTEMPLATE>--> <!--SPM:<SharePoint:ClusteredDirectionalSeparatorArrow runat="server"/>--> <!--SPM:</PATHSEPARATORTEMPLATE>--> <!--SPM:</SharePoint:SPTitleBreadcrumb>-->
- paulpaschaBronze Contributor
One way to remove it, is by downloading your Page Layout HTML file first. You can download from the "Edit Page Layouts" screen in Design Manager. Then open this file in your favorite HTML editor (Notepad for example...). Look for the code below and remove it. Then save your file and upload it back. You can drag and drop from your file system onto the "Edit Page Layouts" screen in Design Manager. Publish the Page Layout and your change should be visible everywhere the Page Layout is used and also for future pages.
Hope this helps!
<!--SPM:<SharePoint:SPTitleBreadcrumb runat="server" RenderCurrentNodeAsLink="true" SiteMapProvider="SPContentMapProvider" WelcomePageUsesWebTitle="false">--> <!--SPM:<PATHSEPARATORTEMPLATE>--> <!--SPM:<SharePoint:ClusteredDirectionalSeparatorArrow runat="server"/>--> <!--SPM:</PATHSEPARATORTEMPLATE>--> <!--SPM:</SharePoint:SPTitleBreadcrumb>-->
- Russ HancockCopper ContributorThanks Paul... perfect!