Thursday, 17 July 2025

🌐 What is Page Template in Power Pages and How to Create a New Page Template in Portal Management

 

Power Pages (earlier known as Power Apps Portals) has become one of the go-to low-code solutions for building secure, data-driven websites. Whether you're creating customer self-service portals, partner portals, or internal sites — page templates play a very crucial role.

In this blog, we’ll understand what a Page Template is in Power Pages, why it matters, and how you can create your own custom page template using Portal Management app.

πŸ“˜ What is a Page Template in Power Pages?

A Page Template in Power Pages defines the layout and logic for rendering a webpage. Think of it like a reusable blueprint or master page — whenever a web page uses a specific page template, it inherits the structure and behavior defined in it.

These templates are tightly coupled with either Web Templates (Liquid based) or custom ASP.NET (.aspx) pages.


πŸ“Œ Key Purpose of Page Templates:

  • To link the page with a specific layout or rendering logic
  • Reusability across multiple web pages
  • Supports Liquid templates (most common) or Web Files / ASP.NET pages
  • Essential for implementing dynamic behavior, layouts, and navigation

🧱 Types of Page Templates

There are two major types of page templates you’ll typically encounter:

  1. Web Template-based
    Uses Liquid code (open-source template language from Shopify). Most Power Pages now use this method.
  2. Rewrite URL or Web File-based
    Used when linking directly to custom .aspx pages or external files.

πŸ› ️ How to Create a New Page Template in Portal Management

Let’s now get into the actual steps to create a custom Page Template using the Portal Management Model-Driven App.

Prerequisites

  • You must have access to the Portal Management app
  • Make sure your Power Pages site is already provisioned
  • Have basic knowledge of Liquid if using web templates

πŸ”§ Steps to Create a New Page Template

  1. Login to Power Apps Admin Center

A screenshot of a computer

AI-generated content may be incorrect.

  1. Navigate to Page Templates
    • On the left pane, expand Page Templates
    • Click on Page Templates

A screenshot of a computer

AI-generated content may be incorrect.

  1. Click on “+ New”
    • Provide a name for the page template (Ex: CustomBlogLayoutTemplate)
    • Select the Type:
      • Choose Web Template if you're writing custom Liquid
      • Choose Rewrite if you're pointing to an ASPX page

A screenshot of a computer

AI-generated content may be incorrect.

  1. Link a Web Template
    • If you selected Web Template, then select or create a new Web Template
      • You can click on the lookup and choose + New Web Template
      • Add Liquid code for layout or logic

A screenshot of a computer

AI-generated content may be incorrect.

Select new web Template/choose existing one,

A screenshot of a computer

AI-generated content may be incorrect.

 

Here I am going to use existing one,

A screenshot of a computer

AI-generated content may be incorrect.

Click Save.

Note: If we are creating new one, use this below web template code,

Example:

liquid

<div class="custom-layout">
    <h1>{{ page.title }}</h1>
    <div>{{ page.content }}</div>
</div>

  1. Set Website and Other Properties
    • Select the Website this applies to
    • Set Is Default if you want this to be the fallback template
  2. Save and Publish

That’s it! You have now successfully created a custom Page Template.

A screenshot of a computer

AI-generated content may be incorrect.


πŸ§ͺ Test Your Page Template

To test it, go to Web Pages > create a new page > link it to your newly created page template. Once saved, browse the page on your Power Pages site and verify your layout and logic.

A screenshot of a computer

AI-generated content may be incorrect.


🧠 Pro Developer Tips

  • Keep your Liquid logic modular and clean
  • Create reusable web templates for headers, footers, and menus
  • Use Web Roles + Entity Permissions to secure content
  • Always preview and test on staging before pushing to production

πŸ“Ž Final Thoughts

Page Templates are a core part of Power Pages architecture, enabling modular design and custom rendering logic. Whether you're a beginner working on a simple support site or an advanced developer building dynamic business portals, mastering page templates gives you full control over your website experience.


No comments:

Post a Comment