Ektron
Creating Web Pages with PageBuilder
PageBuilder lets you easily create new pages on your website. The page template that you choose is initially created by a developer, but you provide final content, design, and placement of functionality on the Web page.
The PageBuilder work flow has the following stages:
Stakeholders may include the CIO, the marketing team, Ektron administrators, Web designers, and developers. When a consensus is reached, the marketing team defines the page layout and presents it to the whole team for review and approval.
A developer creates a wireframethe architecture of a Web page containing columns, dropzones, and layout information. template, which is the basic architecture for a Web page. The developer adds dropzonean area on a Web page where you can drag and drop a widget. user controls where non-technical users into which content authors place functional widgetWidgets are mini-applications that you place on a Web page using PageBuilder; a widget provides either specific functionality (calculators, search, social bars, etc.) or areas into which you can add content (content blocks, list summaries, collections, and so on).s and manage the content, design, and messaging.
Developers manage the level of control non-technical users have. For example, a developer can configure limits for the width of dropzones. The developer should understand the requirements and use, modify, or build widgets based on the requirements. PageBuilder lets IT develop the back-end of a system and address the technical nuances that today’s websites generate.
After a wireframe is created, an administrator assigns the wireframe to a folder, creates a page, and chooses the widgets that user can place on the page.
When wireframe templates are available, you choose the page template you want to use and create new pages, drag-and-drop widgets, edit properties, and so on. You create and maintain content.
PageBuilder pages have the same business-level controls as content blocks. Like other Ektron content, PageBuilder pages maintain permissions, approval chainA series of users or user groups who must approve content before it can be published.s, enable SEO (through metadata), taxonomya content-level categorization system that uses one-to-many relationships to create a scalable organization of content. A taxonomy lets you create a navigation system that is independent of the folder structure., Aliasing, and allow users to view histories and restore past versions.
Approvers can preview PageBuilder pages before they go live, and pages can be cloned and then modified to maintain consistency across campaigns or to support A/B split testing.
Additional PageBuilder Video Resources
You can create a new PageBuilder page from the PageBuilder menu on your website, or from the Workarea. You must have permissions as a content author to log in and make changes to your website. See Defining Roles
IMPORTANT: You should use automatic aliasing in most cases because you cannot standardize an aliasing pattern with manual aliasing. Automatic aliasing standardizes alias naming. See Creating Automatic URL Alias Rules for information about automatic aliasing.
Prerequisite
You must have wireframes already created in a folder. See Assigning the PageBuilder Wireframe to a Folder.
The Add New Page screen appears. (Because only one template is assigned to the folder, it appears as the default.)
After the page is created, a new page opens where you can design the page and other actions, such as check in, view properties, and drop widgetWidgets are mini-applications that you place on a Web page using PageBuilder; a widget provides either specific functionality (calculators, search, social bars, etc.) or areas into which you can add content (content blocks, list summaries, collections, and so on).s onto the page.
NOTE: For information about how to create a widget, see Creating the “Hello World” Widget.
The following image shows a page with a 2-column layout.
NOTE: If your developer sets dropzone column widths programmatically (as explained in Setting a Dropzone’s Column Width Programmatically), you cannot add a column as described here. Many developers disable this option because it gives end users liberty to resize columns when you may want to standardize your layout. If your developer has disabled this option, go to Step 2.
Add a second column to the right of the top one. Then, set the width of both columns.
When the columns are set, insert a ContentBlock widget into the right column.
When published, the content appears in the column.
After you insert content in the right column, insert a List Summary widget in the left column.
Click Edit (). The Editing Widget screen appears.
NOTE: Internet Explorer cannot accommodate more than 32 style sheets in one page. This problem can affect PageBuilder pages, because each widget may include one or more style sheets, and a page can host any number of widgets.
You first create a wireframethe architecture of a Web page containing columns, dropzones, and layout information.. Next, define the dropzonean area on a Web page where you can drag and drop a widget., one or more areas of the page on which a content creator drags and drops widgets. The relationship between a wireframe, a dropzone, and a widgetWidgets are mini-applications that you place on a Web page using PageBuilder; a widget provides either specific functionality (calculators, search, social bars, etc.) or areas into which you can add content (content blocks, list summaries, collections, and so on). is illustrated below.
To create a wireframe that contains one dropzone:
PageLayout.aspx
, the Language to Visual C#, and check Select master page.siteroot/components/templates
.<%@ Register Assembly="Ektron.Cms.Controls" Namespace="Ektron.Cms.Controls" TagPrefix="CMS" %> <%@ Register Src="~/Workarea/PageBuilder/PageControls/PageHost.ascx" TagPrefix="PH" TagName="PageHost" %> <%@ Register Src="~/Workarea/PageBuilder/PageControls/DropZone.ascx" TagPrefix="DZ" TagName="DropZone" %> <%@ Register Assembly="Ektron.Cms.Widget" Namespace="Ektron.Cms.PageBuilder" TagPrefix="PB" %>
ContentPlaceHolder1
and enter this code. IMPORTANT: When inserting the following code, begin the <ColumnDefinitions>
statements with the TagPrefix on the widget assembly registration line (PB
in the example above). Do not use IntelliSense when entering <ColumnDefinitions>
statements—it may insert an incorrect prefix.
<PH:PageHost ID="PageHost1" runat="server" DefaultPageID="937" SelTaxonomyID="94" /> <DZ:DropZone ID="Middle" runat="server" AllowAddColumn="false" AllowColumnResize="false"> <ColumnDefinitions> <PB:ColumnData width="100" columnID="0" unit="pixels"></PB:ColumnData> <PB:ColumnData width="100" columnID="1" unit="pixels"></PB:ColumnData> <PB:ColumnData width="100" columnID="2" unit="pixels"></PB:ColumnData> </ColumnDefinitions> </DZ:DropZone>
With the PageBuilder menu (PageHost) and Dropzone in place, the template looks like this when you are logged in and ready to configure a PageBuilder page.
This control lets a content author drop widgets on the page. It also provides the save/check in/publish functions, and lets the author preview the page when it is published. The content author uses a Dropzone control as a placeholder, into which you insert widgets. You also can use it to insert additional placeholders as needed.
The pagelayout.aspx
code now looks like this.
Best Practice
Assign an appropriate value for the SelTaxonomyID
property. See Assigning a Default Page to a Wireframe and Assigning a Default Taxonomy Category to a Wireframe.
PageLayout.aspx.cs
.using Ektron.Cms.PageBuilder.
System.Web.UI.Page
. To do this, change:public partial class PageLayout : System.Web.UI.Page
To:
public partial class PageLayout : PageBuilder
public override void Error(string message) { jsAlert(message); } public override void Notify(string message) { jsAlert(message); } public void jsAlert(string message) { Literal lit = new Literal(); lit.Text = "<script type=\"\" language=\"\">{0}</script>"; lit.Text = string.Format(lit.Text, "alert('" + message + "');"); Form.Controls.Add(lit); }
You do not need to use the jsAlert system defined here. But if you do not, you must add overrides to handle errors and notifications.
The code page for pagelayout.aspx.cs
looks like this.
PageLayout.aspx
and PageLayout.aspx.cs
files.A Master Layout is a special type of PageBuilder template that may include a special kind of dropzonean area on a Web page where you can drag and drop a widget. called a Master Zone. A Master Zone is only editable by users assigned to the Administrators group or the MasterLayout-Create role. All other dropzones on a Master Layout template are called Layout Zones. Anyone can edit them.
An example use of this template is: a department head reserves one Master Zone on the department pages for content that only the department head may edit. Content authors may drag and drop a widgetWidgets are mini-applications that you place on a Web page using PageBuilder; a widget provides either specific functionality (calculators, search, social bars, etc.) or areas into which you can add content (content blocks, list summaries, collections, and so on). into other dropzones, but cannot edit the Master Zone.
The following diagram shows a Master Layout template that contains 2 dropzones and 4 widgets. In the example below, the Master Zone contains a Flckr widget.
When a Master Layout is published, you can use it like any other template. The following figure shows a sample page that uses a Master Layout.
After you created a wireframethe architecture of a Web page containing columns, dropzones, and layout information. with 2 dropzones, both of which are editable, you can set a dropzone so that others may not edit it.
Master Layouts
.After the wizard finishes, you see a new Master Layout page with dropzonean area on a Web page where you can drag and drop a widget.s that can be used for Master Layout areas. You must unlock a dropzone to convert it to a Master Zone. The following figure shows a Master Layout with dropzones.
IMPORTANT: Unlocking this dropzone deletes columns and widgets that are on templates based on this master layout. Click OK to unlock this dropzone.
Before creating a PageBuilder page based on the Master Layout, you must add it to the templates available to the Pages folder. To do this:
After you create the Master Layout page and assign it to the Pages folder, you can use it for other PageBuilder pages. To do this:
You can now place widgets in the PageBuilder page's Layout Zones.
Prerequisite
You must be an Administrators group member or assigned to the MasterLayout-Create role
You may want to convert a Master Zone back to a Layout zone. To do this:
WARNING! Locking this dropzone deletes columns and widgets in the master zone, and affects all templates based on this Master Layout.
An Ektron administrator uses the wireframe that a developer made, and determines which widgets will be available to the wireframe.
PageLayout.aspx
, the wireframe you created earlier in Creating a PageBuilder Wireframe.Create a folder for the content that appears on the new page by performing these steps.
NOTE: You should keep content and PageBuilder pages in separate folders, so you can later create and configure a folder called “Content.” The content folder will contain content blocks, assetan external file, such as a Microsoft Word document or image, stored in Ektron. It can be managed like native Ektron content.s, and sub-folders.
Pages
in the Name field.PageLayout.aspx
is added to the list of page templates.pagelayout.aspx
as the template, assign a template for creating Ektron content.You can assign a default page to a wireframe. If you do, and a site visitor enters a URL with a path to that wireframe that lacks a query string ID, the default page appears. The following example explains this feature.
http://siteroot/cms400developer/developer/PageBuilder/PageLayout.aspx?pageid=1036
PageLayout.aspx
file’s PageBuilder menu user control DefaultPageID
property.http://siteroot/cms400developer/developer/PageBuilder/PageLayout.aspx
(Note lack of query string parameter)
To assign a default page to a wireframe:
DefaultPageID
.Here is an example of that line with the DefaultPageID
property added.
<ucPageBuilder:PageHost ID="ucCms400Developer" DefaultPageID=”1035” runat="server" />
To continue the above example, if someone opens a browser and enters http://siteroot/cms400developer/developer/PageBuilder/PageLayout.aspx
, he is redirected to
http://sitroot/cms400developer/developer/PageBuilder/PageLayout.aspx?pageid=1035
While creating a new PageBuilder page in the Workarea, the user can assign one or more taxonomya content-level categorization system that uses one-to-many relationships to create a scalable organization of content. A taxonomy lets you create a navigation system that is independent of the folder structure. categories that are set in the page’s folder properties. See example below.
As a developer, you can assign a default taxonomy category to a wireframe. If you do, and the user creating a page using that wireframe makes no changes, the default category is assigned to the page. However, the user can change the taxonomy when the Add New Page screen appears.
NOTE: Default taxonomies are applied only when a user logs into a website and adds a new page -- they are not applied when creating new pages within the Workarea.
To assign a default taxonomy category to a wireframe:
Prerequisite
The ID number and the name of the top-level parent taxonomy for the default taxonomy category. For example, the screen shows that the Products category ID is 190, and its parent taxonomy is OnTrek Site Navigation.
SelTaxonomyID
.Here is an example of that control with the SelTaxonomyID
property added.
<ucPageBuilder:PageHost ID="ucCms400Developer"
SelTaxonomyID
=”13” runat="server" />
To continue the above example, the next time someone creates a page based on that wireframe, taxonomy ID 13 will be the page’s default taxonomy category. If desired, the user can change it by navigating to the Taxonomy tab and assigning different or additional categories.
To set a dropzonean area on a Web page where you can drag and drop a widget.’s column widths programmatically:
Register
statements to the page’s <head>
tags.IMPORTANT: The Widget and Dropzone assemblies must have the same Tag Prefix. See example.
<%@ Register Assembly="Ektron.Cms.Widget" Namespace="Ektron.Cms.PageBuilder" TagPrefix="PB" %> <%@ Register Src="~/Workarea/PageBuilder/PageControls/PageHost.ascx" TagPrefix="PB" TagName="PageHost" %> <%@ Register Src="~/Workarea/PageBuilder/PageControls/DropZone.ascx" TagPrefix="PB" TagName="DropZone" %> <%@ Register Assembly="Ektron.Cms.Widget" Namespace="Ektron.Cms.PageBuilder" TagPrefix="PB"%>
<body>
tags, add the following code.<PB:DropZone ID="Middle" runat="server"> <ColumnDefinitions> <PB:ColumnData width="100" columnID="0" unit="pixels"></PB:ColumnData> <PB:ColumnData width="100" columnID="1" unit="pixels"></PB:ColumnData> <PB:ColumnData width="100" columnID="2" unit="pixels"></PB:ColumnData> </ColumnDefinitions> </PB:DropZone>
Set width
to an appropriate number. For the unit
, the options are
If you set a dropzone’s column widths programmatically, you must also set the AllowAddColumn
and AllowColumnResize
properties to false
. If you do not, users working with widgets can add columns and adjust column widths on the page, but their changes will revert to these settings when they try to save.
By default, when a site user creates a new PageBuilder page from an existing one, it is saved to the same Ektron folder. For example, consider this folder/content structure.
-Root (folder id 0) --Products (folder id 20) ---PageLayout: “Omaha Mailorder Steaks” (content id 35) --Services (folder id 30)
If you are viewing content id
35 and click New Page or Copy/Save as, the new page is saved to that content’s folder (Products, folder id= 20
).
NOTE: When you create a new page layout from the Workarea, you first select a folder then begin creating the page layout.
Use the PageBuilder control’s FolderID
property in the .aspx page to override the default and specify an Ektron folder to which new pages are saved. Here is an example of that property:
<ucPageBuilder:PageHost ID="ucPageHost1" FolderID="25" runat="server" />
When a user is working on a page that hosts this PageBuilder control, and he saves a new page, it is saved to folder id
25.
Use the CacheInterval
property to cache a page and its widgets that represent Ektron server controls, such as a Collection widget. This property sets the amount seconds for which data is cached. The default is 0 (zero).
<ucPageBuilder:PageHost ID="ucPageHost1" CacheInterval="25" runat="server" />
Use the AllowAddColumn
property to let users add columns to a dropzone.
<ucPageBuilder:DropZone ID="ucDropZone1"
AllowAddColumn="true"
AllowColumnResize="true" runat="server" />
For example, a Dropzone initially contains one column, but the page creator wants 3. If this property is set to true
, this change is possible. This property’s default value is true
.
NOTE: If you set dropzone’s column widths programmatically (as explained in Setting a Dropzone’s Column Width Programmatically), the user cannot add a column, regardless of this setting.
Use the AllowColumnResize
property to let users change the width of columns in a dropzonean area on a Web page where you can drag and drop a widget..
<ucPageBuilder:DropZone ID="ucDropZone1"
AllowAddColumn="true" AllowColumnResize="true" runat="server" />
For example, column width is 100% by default. A page creator wants to change it to 50%. If this property is set to true
, this change is possible. This property’s default value is true
.
NOTE: If you set dropzone’s column widths programmatically (as explained in Setting a Dropzone’s Column Width Programmatically), the user cannot add a column, regardless of this setting.
The following shows a complete example of AcmeBooksMasterPage.master
, PageLayout.aspx
, and PageLayout.aspx.cs
.
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="AcmeBooksMasterPage.master.cs" Inherits="AcmeBooksMasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Acme Books</title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> </head> <body> <form id="form1" runat="server"> <div> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html>
<%@ Page Language="C#" MasterPageFile="~/AcmeBooksMasterPage.master" AutoEventWireup="true" CodeFile="PageLayout.aspx.cs" Inherits="PageLayout" Title="Untitled Page" %> <%@ Register Assembly="Ektron.Cms.Controls" Namespace="Ektron.Cms.Controls" TagPrefix="CMS" %> <%@ Register Src="~/Workarea/PageBuilder/PageControls/PageHost.ascx" TagPrefix="PH" TagName="PageHost" %> <%@ Register Src="~/Workarea/PageBuilder/PageControls/DropZone.ascx" TagPrefix="DZ" TagName="DropZone" %> <%@ Register Assembly="Ektron.Cms.Widget" Namespace="Ektron.Cms.PageBuilder" TagPrefix="PB" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <PH:PageHost ID="PageHost1" runat="server" DefaultPageID="937" SelTaxonomyID="94" /> <DZ:DropZone ID="Middle" runat="server" AllowAddColumn="false" AllowColumnResize="false"> <ColumnDefinitions> <PB:ColumnData width="100" columnID="0" unit="pixels"></PB:ColumnData> <PB:ColumnData width="100" columnID="1" unit="pixels"></PB:ColumnData> <PB:ColumnData width="100" columnID="2" unit="pixels"></PB:ColumnData> </ColumnDefinitions> </DZ:DropZone> </asp:Content>
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ektron.Cms.PageBuilder;
public partial class PageLayout : PageBuilder
{ protected void Page_Load(object sender, EventArgs e)
{}
public override void Error(string message)
{jsAlert(message);}
public override void Notify(string message)
{jsAlert(message);}
public void jsAlert(string message)
{ Literal lit = new Literal();
lit.Text = "<script type=\"\" language=\"\">{0}</script>";
lit.Text = string.Format(lit.Text, "alert('" + message + "');");
Form.Controls.Add(lit);
}
}