Create and use a template page


About

Template pages offer administrators the flexibility to craft customized pages by selecting specific components. These versatile components aren't just for the Custompages module - you can use them to craft unique pages anywhere. 

Learn how to create and activate template pages as site pages in our step-by-step guide or watch our instructional video.

Prerequisites

To get started, make sure that the Theming module  is enabled on your application, then turn on the Templatepages module  and the Custompages module in this order.

Create a page

Build the page

  1. Navigate to the Templatepages module at https://{your_site_url}/admin/config/tab/templatepages.
  2. Click the +Add TemplatePage button.
  3. Give your page a name, set the navigation type, and set the hero type.
  4. When you have finished configuring, click Save

For more details, see the Templatepages module article.

Enable the page

  1. Navigate to the custompages module at https://{your_site_url}/admin/config/tab/custompages.
  2. Click the +Add CustomPage button. 
  3. Click Save. You now have a new page available for you to use with a unique URL.

For more details, see the Custompages module article.

Publish the page

The URL for your page can be used in a few locations, or can be shared via emails and not be directly available from the site.

To make the URL available on the site, use any one of the following modules as an example:

You can also add it as a link to entry or channel descriptions, and even on other template pages.

Examples

Set up a homepage

There are two ways to set up a homepage in the Video Portal - by using a URL or by using the 'custom page' option:

URL

Follow the instructions above to create a template page, and then a custom page with a dedicated URL such as "https://site_url/home".

Turn off the home module to work with the template pages. 

Navigate to the navigation module, and set the first "pre" element as described below:

  • Type = Link
  • Name = Home
  • value = /home
  • sameWindow = Yes

Custom page

Navigate to the navigation module, and set the first "pre" element as described below:

  • Type = Custom page
  • Name = Home
  • page = Choose the 'home' page you created from the drop-down list

Set up multiple homepages

You can setup multiple homepages for different user groups.

Follow the instructions above to create a few template pages and then custom pages. At this point you should have a few working pages with a dedicated URL for each such as "https://site_url/home_en", "https://site_url/home_fr".

Turn off the home module to work with the template pages. 

In this example, we will work with two pages that were created with the URLs "https://site_url/home_en" and  "https://site_url/home_fr".

  1. Navigate to the navigation module, and set the first "pre" element as described below:
  • Type = Link
  • Name = Home
  • value = /home_en
  • sameWindow = Yes
  • Under the allowedGroups section, choose the group that should see this home. Any user not in that group, will not have this homepage in their navigation bar.
  • Create the next "pre" element (must be the second in the list):
    • Type = Link
    • Name = Home
    • value = /home_fr
    • sameWindow = Yes
  • Under the allowedGroups section, choose the second group.
  • You can continue with this process for more groups. Any user not in these groups will have the next available "pre" elements as their homepage (can be a generic page such as "My Media" or "All Channels").

    Registration component

    You can make registering easy for your users by adding the registration form to your homepage. When users click "Register", a side panel opens for quick completion - no need to leave the page!

    Simply configure the registration component in your 'home' templatepage (see Templatepages - registration).

    Below is an example of the Registration component on a Video Portal homepage:


    Was this article helpful?
    Thank you for your feedback!
    User Icon

    Thank you! Your comment has been submitted.

    In this article
    Related articles