CHunky Universe of Vigourous Astonishing SHarepoint :)

Tag Archives: page layout

Add article content and editing to your Page Layout

If you work with Sharepoint Designer, use your own page layouts and want to have them for a page in a publishing site, you have to put in some controls in order to see th page content in you custom page layout. Put in a appropriate place in you page layout ( taken from ArticleLeft.aspx):

	<PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel">
		<SharePoint:TextField runat="server" FieldName="Title"/>
	<div class="captioned-image">
		<div class="image">
			<PublishingWebControls:RichImageField FieldName="PublishingPageImage" runat="server"/>
		<div class="caption">
			<PublishingWebControls:RichHtmlField FieldName="PublishingImageCaption"  
				AllowTextMarkup="false" AllowTables="false" AllowLists="false" 
				AllowHeadings="false" AllowStyles="false" AllowFontColorsMenu="false" 
				AllowParagraphFormatting="false" AllowFonts="false" PreviewValueSize="Small" 
				AllowInsert="false" runat="server"/>
	<div class="article-header">
		<div class="date-line">
			<SharePoint:DateTimeField FieldName="ArticleStartDate" runat="server"/>
		<div class="by-line">
			<SharePoint:TextField FieldName="ArticleByLine" runat="server"/>
	<div class="article-content">
		<PublishingWebControls:RichHtmlField FieldName="PublishingPageContent" 
			HasInitialFocus="True" MinimumEditHeight="400px" runat="server"/>
	<PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel roll-up">
		<PublishingWebControls:RichImageField FieldName="PublishingRollupImage" 
			AllowHyperLinks="false" runat="server" />
		<asp:Label text="<%$Resources:cms,Article_rollup_image_text%>" runat="server" />

Custom PlaceHolder

You want some custom content in your site and it is different from page to page. Well, I wrote how to achieve this with delegate controls. Another approach is to use PlaceHolders. Maybe you can use some existing placeholders. There are so many unused placeholders in v4.master. Like PlaceHolderLeftActions. If you use starter master pages from Randy Drisgill, you must move these from invisible panel.

To create custom placeholder is very easy:

Just copy an existing placeholder in the master page and name it som appropriate like:

       runat="server" />

In your custom page layout, or application page, just add asp:Content and put your html there:

           Hello World

Show Title on Page

If you want to show the page title in another part than defined in your master page just add this tag to your page layout.

    Property="Title" runat="server" />

It must be within <asp:Content> tag

Webparts on a layoutpage which is provisioned several times

It is pretty easy to add webparts to a layout page. Just define the webparts in the corresponding Elements.xml file. Like you do in onet.xml. It works fine if you provision just a single page with this layout on a web. If you have multiple pages that use the same page layout (e.g. in WCM). The trick is to use the attribute IgnoreIfAlreadyExists in the File tag:

Daniel Chronlund Cloud Tech Blog

News, tips and thoughts for Microsoft cloud fans

Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Architect, Speaker, Author

Microsoft 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Mai Omar Desouki

PFE @ Microsoft

Cameron Dwyer

Office 365, SharePoint, Azure, OnePlace Solutions & Life's Other Little Wonders


Me and My doings!

Share SharePoint Points !

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

Aryan Nava

DevOps, Cloud and Blockchain Consultant


SharePoint for everyone


Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint


Mostly what I know and share about...