Return to doc.sitecore.com

Valid for Sitecore 5.2, 5.1.1
  Create a Placeholder
Prev Next

To create a Placeholder:

  1. using the WYSIWYG Layout Editor:
    1. Log in to the Sitecore Desktop on a development server as a user with appropriate permissions.
    2. Open Layout Studio.
    3. Choose File » Open » Layout or File » Open » Sublayout and choose the Layout or Sublayout to which the Placeholder will be added.
    4. Drag the token Placeholder in the tree at the left of Layout Studio onto the Layout or Sublayout where the Placeholder should be added.
    5. Double-click on the Placeholder to change its properties, specifically its key.
    6. Save the Layout or Sublayout.
  2. To create a Placeholder using Microsoft® Visual Studio .NET:
    1. Open the project in Visual Studio.
    2. Open Solution Explorer and navigate to the Layout or Sublayout (generally in the /layouts folder).
    3. If the Layout or Sublayout has not been added to the project, right-click on the file and add it to the project.
    4. Double-click on the Layout or Sublayout.
    5. Select the HTML tab.
    6. Ensure the TagPrefix sc has been registered in the header of the file with code such as <%@ register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Kernel" %>.
    7. In the source-code view, add code such as <sc:placeholder runat="server" key="content"  /> where key is the key to associate with this Placeholder.

Prev Next