22

I know exactly what you're looking for. While a debate about proper link tag usage and CSS storage folders is always a fun topic, realize none of that is your issue here. There are two components that allows you to add <link> tags to Page Layouts. First, you need to find the following lines of code in the head of the Page Layout's HTML page: <!--...


15

SharePoint 2013 In 2013 you can use design manager for generating web-part zone snippet. To insert a Web Part zone snippet Browse to your publishing site. In the upper-right corner of the page, choose the Settings gear, and then choose Design Manager. In Design Manager, in the left navigation pane, choose Edit Page Layouts. Select the name of the page ...


13

Add <SharePoint:FieldValue FieldName="Title" runat="server"/> for Page title or <SharePoint:ProjectProperty Property="Title" runat="server" /> for Site title in one of the ContentPlaceHolders in the PageLayout, for the body in the <asp:Content runat="server" ContentPlaceholderID="PlaceHolderMain">


10

Wael actually had the correct answer. Here is the gist of what needs to be done for packaging a Page Layout: Using Visual Studio, you can create a new Module and add your page layout to that file. Then, in the elements.xml file for that Module, here is what I typically use: <Module Name="PageLayouts" Url="_catalogs/masterpage"> <File Path="...


9

I fixed it after wasting frustrating hours on this ! Its quite easy but doesnt make sense. Just add the HTML 4.1 (not HTML 5 - it wont work) char encode tag to the additional pagehaed placeholder, and it works like a charm. Make sure that you've tried the other solutions, may it's the result of a combination. Fact is, that it is already included in the ....


9

You can't change the .master file when it's bound like this, you can only edit the .html file. It will re-generate the .master when you save the .html. This is due to the Design Manager packet in SP2013. Here's the MSDN article on this feature set: http://msdn.microsoft.com/en-us/library/office/jj822363(v=office.15).aspx


9

The issue is that you should copy seattle.html which will auto create a .master page for you, and there is a link between the files. To resolve the issue, create a copy of seattle.html Now you have both a seattle_copy(1).html and seattle_copy(1).master. Next rename seattle_copy(1).html to for example test.html. A pop-up appears asking you to update pages ...


8

First create your User Control and publish is to SharePoint. Then you register a tag for your control <%@ Register Tagprefix="MyControls" Namespace="KM.MyControls.MyControl" Assembly="KM.MyControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=<Your token>" %> Then you can reference your User Control <MyControls:MyUserControl ...


8

Try using !important after your rule to override the inline style: #s4-titlerow{ display: none !important; }


8

Add the following snippet: <WebPartPages:WebPartZone runat="server" Title="TestZone1" ID="TestZone1"> <ZoneTemplate></ZoneTemplate> </WebPartPages:WebPartZone> It works.


7

Make sure you put the user control into a subdirectory of {SharePointRoot}/Templates/ControlTemplates Put a Register element at the top of you page-layout <%@ Register TagPrefix="MyOwnPrefix" TagName="MyUserControl" Src="~/_controltemplates/MyProjectName/UserControl.ascx" %> and the refer to it where you need it like: <MyOwnPrefix:MyUserControl ...


7

If you have deployed the CSS file to the Style Library or an Assets library, make sure it is checked in as a major version and approved. It could be possible that your page layout is not published and approved as well. This is the typical symptom when an asset is not approved, it works fine for admins but not general users.


7

Open in new tab is only supported in Publishing URL field. You are using the basic URL field. You need to use PublishingWebControls:RichLinkField. This will give you the "open in new window" option. Cheers!


6

Force the editor to open in "Web Form Editor" as you mentioned and add "MasterPageFile "attribute like below, you should be able to get intellisense. <%@ Page Language="C#" Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage,Microsoft.SharePoint.Publishing,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" MasterPageFile=""%> ...


6

The promoted links default size is 150x150 pixel. But you can always have bigger/smaller pictures and then manipulate the CSS for the promoted links if you want bigger/smaller tiles. Change the default tile size in Sharepoint 2013 Edit Add this to the bottom of the CSS before closing the style tag. .ms-tileview-tile-content img { width:100px!...


6

Since the control has a CssClass Property, you could manipulate the target attribute using JQuery. For example (not tested): <SharePointWebControls:UrlField ID="UrlField2" FieldName="Link Button" runat="server" CssClass="item-link" /> And on the JQuery side: $(function() { $(".item-link").attr('target', '_blank'); });


5

In the head section of the master page you need to define a tag prefix in the style of: <%@ Register Tagprefix="Yourwebpart" Namespace="yournamespace" Assembly="yourassemblyname, Version=1.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> Also don't forget to change the PublicKeyToken and version number. In the location where you want to ...


5

The only difference would be where your master page places them. Out of box master pages usually have the PlaceHolderPageTitle in the head section - title tag. <head> <title><asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/></title> </head> PlaceHolderPageTitleInTitleArea is instead used in the title table, ...


5

Get the relevant Publishing web which contains GetAvailablePageLayouts, and find the one which you should use to create your page. See sample code: PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web); string pageName = "YourCustomPageLayout.aspx"; PageLayout[] pageLayouts = publishingWeb.GetAvailablePageLayouts(); PageLayout ...


5

There are custom SharePoint CSS classes that you may need to overwrite to change the colour of the hovering. Using IE developer tools I found that the two classes you're looking at are .ms-welcome-hover and .ms-siteactions-hover the welcome hover class obviously being the top bar for the page. This code in your custom CSS should change it to a blue ...


5

I think this still holds true, http://blog.brianfarnhill.com/2008/10/showing-the-date-modified-date-on-a-page-layout <PublishingWebControls:LastModifiedIndicator runat="server" /> or <SharePoint:FieldValue FieldName="Modified" runat="server" id="modified" ControlMode="display" />


5

Since AdditionalPageHead is a Content Place Holder, you can use respective asp:Content control as shown below: <asp:Content runat="server" ContentPlaceHolderID="PlaceHolderAdditionalPageHead"> <!-- Add stuff here --> </asp:Content> You can add more Content Place Holders anywhere in the MasterPage and use them in the Pages.


5

How to update Page Layout for a Page via CSOM (JavaScript) function updatePublishingPage(pageUrl,properties) { var context = SP.ClientContext.get_current(); var site = context.get_site(); var web = context.get_web(); var pageFile = web.getFileByServerRelativeUrl(pageUrl); var pageItem = pageFile.get_listItemAllFields(); context....


5

How about something like this: <script type="text/javascript"> _spBodyOnLoadFunctions.push(function(){ ExecuteOrDelayUntilScriptLoaded(showStatusAlert, "sp.js"); }) function showStatusAlert(){ var ctx = SP.ClientContext.get_current(); var web = ctx.get_web(); var list = web.get_lists().getById(_spPageContextInfo.pageListId); var ...


5

Option 1 How to add/upload publishing page layout via CSOM in PowerShell: [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime") Function Get-ClientContext([string]$Url,[string]$UserName,[string]$Password) { $SecurePassword = $Password | ...


5

What you have described in your question is not called a site template , it's called a page layout as shown below : So To create a page layout follow the mentioned steps below Browse to your publishing site. In the upper-right corner of the page, choose the gear icon, and then choose Design Manager. In Design Manager, in the left navigation pane, choose ...


5

I think your issue is using for(let i = 0 syntax. It has not worked very well in IE < edge: https://stackoverflow.com/questions/39159669/let-statement-in-loop-doesnt-work-as-expected-in-ie


4

I was facing the exact same issue and resolved it by setting ReplaceContent="true" in the element.xml file of the module as below <File Path="MasterPageModule\MyMasterPage.master" Url="MyMasterPage.master" Type="GhostableInLibrary" ReplaceContent="TRUE" Level="Published"/> Also you can get it here https://blog.lekman.com/2013/06/page-layouts-and-...


4

Hi Take a look at this tool, http://spcrew.com/blogs/lists/posts/post.aspx?id=18 it makes use of swapping page layouts. has been very helpful


Only top voted, non community-wiki answers of a minimum length are eligible