Virginia Tech® home

How Do I ... Change a page template for an existing page?

There are times when you may need to change the page template assigned to a page. We don't encourage this practice, but if you need to change a page template it can be done by a web administrator role that has requested access to the CRX/DE administrative interface in Ensemble.

Web administrators can submit a support ticket to request access to the CRX/DE administrative interface. It is highly recommended that you familiarize yourself and make test changes on the pre-production (PPRD) server, and when you are comfortable to make any necessary changes on the production author environment.

NOTE: If you are making changes to a published page, you will need to republish the page after saving changes in CRX/DE to see the changes. You may also need to flush the site cache by publishing your site home page or another page at that level.

Open a browser window and enter the following URL for the authoring environment you want to access, PPRD or PROD:

Browser with URL for CRX/DE admin interface
Browser with URL for CRX/DE admin interface

Copy the /content link for the page you want to update, without the ".html" at the end, example:

/content/somesite_vt_edu/en/test-page

Press RETURN/ENTER on your keyboard to find and select that page.

Browser with CRX/DE search field with example page path
Browser with CRX/DE search field with example page path

The page you want to update should now appear in an expanded content tree view in the left sidebar of the CRX/DE interface.

CRX/DE left sidebar content tree view with page entered in search field selected
CRX/DE left sidebar content tree view with page entered in search field selected

Click the plus ("+") sign to the left of the page node to expand it.

Click on the title of the jcr:content node that appears directly under the page node. Make sure not to enter rename mode.

NOTE: Click off the node and back again to exit rename mode.

IMPORTANT: Do not press the enter key in any field related to a node in the CRX/DE interface.

CRX/DE left sidebar content tree with expanded page node and jcr:content node selected
CRX/DE left sidebar content tree with expanded page node and jcr:content node selected

Once the jcr:content node for the page is selected, a Properties dialog will appear in the bottom pane of the CRX/DE interface.

The two property values to change are:

  • cq:template
  • sling:resourceType

 

You will be double-clicking on each of these fields and changing the first part of the hyphenated template name to match the page type you want. The options are:

  • article
  • bio
  • general
  • home
  • redirect
  • resource
  • search
Page jcr:content node properties tab at bottom of CRX/DE browser window.
Page jcr:content node properties tab at bottom of CRX/DE browser window.

IMPORTANT: Do not press the enter key in any field related to a node in the CRX/DE interface.

Change each property value and then click off the field within the same properties pane. You will see a red triangle appear in the top-left corner of each updated field.

Once the changes are acknowledged in all fields with the red triangle, you now need to click the Save All button in the top-left corner of the CRX/DE interface window.

The page template will now be changed for the selected page when the page is either reloaded or opened in the Edit interface in Ensemble.

NOTE: The page icon may not change immediately (or at all) within the My Sites interface, but the structure of the page should now match the updated template.

Page jcr:content properties for cq:template and sling:resourceType updated for new page template
Page jcr:content properties for cq:template and sling:resourceType updated for new page template