Apply a page template

This page is part of a series you should follow sequentially from beginning to end. Go to the first step.

In the last step, you defined a simple page template in code.

Now that the template is set up, you can apply it to new landing pages. Let’s return to the Xperience administration interface and create a home page to try it out!

At this point, you have not yet designated a home page, so you will get an error when you visit the root of the site. However, you can still log in to the administration interface through the /admin path.

From the dashboard, navigate to the Kickstart pages channel and create a new page with the following values:

  • Page name: Home
  • Content type: Landing page.

Screenshot of the new page dialog for the home page

Then provide the Home page with a Slogan content item to display. Click Create new under Slogan and define a new slogan with the following properties:

  • Content item name: Welcome slogan
  • Location: Uncategorized (no folder)
  • Content type: Slogan

Screenshot of the new page dialog for the home page

Click Slogan, and fill out the following properties:

  • Message: Welcome to the Kickstart project!

Finally, publish the reusable slogan item and the Home page that references it.

Reusable content items

The Home content item you just created and published can be reused in other pages and different channels.

For example, if you now create another Landing page, you can reference the Welcome slogan content item by using the Select existing option. If you later decide to change the Slogan of the Welcome slogan item, the change will show on both pages because they are both pointing at the same item in the Content hub.

Designate the home page of the site

Now that the website can display your page, let’s designate it as the home page. This way, if you hit the root domain of the site with no path, the page will display.

Open the Channel management application and navigate to Kickstart pages → Channel settings.

Enter /Home into the Home page setting, and save.

This property takes the Tree path of a page. Find this value for any page by visiting it in the Content tree of its channel, choosing Properties, and expanding the Information section to view the Tree path property.

Check your progress

Your page and content are successfully published.

When you navigate to your new Home page in the Kickstart pages channel and switch to the Preview or Page Builder tabs, you should be able to see the new item’s message displayed on the page.

Screenshot of the home page

However, you may notice that when you edit the page on the Page Builder tab the publish button does not work, and that the Page Builder area you included in the view is nowhere to be seen. This is because these features rely on Page Builder scripts, which are currently missing.

Keep following along with this series to add a layout view that enables them!

Previous step: Build a page template — Next step: Create a layout view

Completed steps: 8 of 13