Changing the Default Template

Overview

Users may want to change the default template that is preselected when a user wants to create a new page. This article shows how to achieve this.

 

Requirements

 

Solution

  1. Please make sure that database backup has been created and validated.
  2. Please access your SQL console from Persona Bar > Settings > SQL Console.
  3. Execute SQL query below to find the PortalId that you would like the default template to be modified. If you only have one portal, the PortalId should be 0.
    SELECT * FROM Portals;
  4. Take note of the PortalId that you need.
  5. Execute SQL query below to get the whole templates available for the portal in question:
    SELECT * FROM Tabs WHERE TabName = 'ContentPageTemplates' AND PortalID = <Enter PortalID>;
  6. The above query should list out the TabId that we could use as a reference to find all templates stored in the database. Take note of the TabId and SkinSrc of the template that you want to be the default template for the portal.
  7. Execute the SQL query below to change the configured SkinSrc value which determines the default template:
    UPDATE PortalSettings SET  SettingName = '<Enter the SknSrc of the template from the previous SQL query>' Where SettingName = 'DefaultAdminSkin' AND PortalID = <Enter PortalID>;
    UPDATE PortalSettings SET SettingName = '<Enter the SknSrc of the template from the previous SQL query>' Where SettingName ='DefaultPortalSkin' AND PortalID = <Enter PortalID>;
  8. Refresh cache, restart application pool and restart the application

Comments

0 comments

Article is closed for comments.