Thursday 19 January 2012

How to ghost your custom layouts master and aspx pages in sharepoint

Here is another quick tip on How to ghost your custom layouts master and aspx pages in sharepoint.
While deploying your files like custom Layout Page, Master Page or custom aspx page you might choose to use the available module element. The module element contains <File> tags which specifies the location\URL of the file being deployed. This tag has some additional options to tell Sharepoint if the resource being added is Ghostable or not.

Ghostable and Ghostableinlibrary - Ghostable is used when you need to save the file on the file system. For example, if you need to deploy a cutsom aspx page or a custom master page you can specify Ghostable like below

<file Url="default.aspx" Type="Ghostable">

Ghostableinlibrary is used when you have to deploy your stuff in library. For example deploying CSS, js files in Styles Library in SharePoint 2010. This gives you ability to check in\check out the files and use versioning as well. You can use it by

<file Url="StyleCSS.css" Type="Ghostableinlibrary">

No comments:

Post a Comment