Skip to content

Go through Template Configuration

Trevor Fayas edited this page Sep 8, 2022 · 3 revisions

When converting templates (KX12 To 13 Converter -> Page Converter -> 1 - Template Conversion), you'll want each template to resolve to some new page builder template in almost all cases, except when the page itself isn't needed.

Analyze Template Usage

Use the below SQL to see what pages are using the given template:

declare @PE_CodeName nvarchar(100) = 'AccessoryCategories'
declare @TemplateID int = (select top 1 PageTemplateID from CMS_PageTemplate where PageTemplateCodeName = @PE_CodeName)

-- Templates
select SiteDisplayName, DocumentNamePath, NodeAliasPath, DocumentCulture from View_CMS_Tree_Joined
inner join CMS_Site on SiteID = NodeSiteID
where Coalesce(NULLIF(DocumentPageTemplateID, 0), NULLIF(NodeTemplateID, 0), 0) = @TemplateID
order by NodeSiteID, DocumentNamePath

Ignored Templates

Since a page ultimately should have a template that it resolves to, if you want to remove a template, it may be wiser to first remove those pages that use the template. Then you can re-run the configuration and hopefully eliminate the template all together.

Combining Similar Templates

Since KX13 (as of hotfix 31 I think) allows for Properties on Templates, a feature Portal Engine never had, often you can combine multiple templates into one. An example is there was various Column Templates that came with the bootstrap layout tool (100 column, 25-50-25, 33-33-33, 25-75 and 75-25 i think).

These templates could be combined into a single generic.ColumnsTemplate with a property of Layout set to 100, 25-50-25, 33-33-33, 25-75, or 75-25 respectively. And then the page template would set the proper column divs depending on that property. Just add the "Layout: "100" to the PB_KeyValuePairs object.

Mapping multiple zones to a single Editable Area

Keep in mind that there may be a case where all you want to preserve is the widgets. You can very easily set the PB_EditableAreaName of multiple zones to a single EditableArea name on the new Page Builder Template.