{"id":41062,"date":"2025-04-25T15:35:36","date_gmt":"2025-04-25T10:05:36","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=41062"},"modified":"2025-04-25T15:40:04","modified_gmt":"2025-04-25T10:10:04","slug":"how-to-create-reusable-custom-component-using-web-template-in-power-pages","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2025\/04\/how-to-create-reusable-custom-component-using-web-template-in-power-pages\/","title":{"rendered":"How to Create Reusable Custom Component using Web Template in Power Pages"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-41066\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/image.png\" alt=\"Web Template in Power Pages\" width=\"1925\" height=\"1100\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/image.png 1925w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/image-300x171.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/image-1024x585.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/image-768x439.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/image-1536x878.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/image-660x377.png 660w\" sizes=\"(max-width: 1925px) 100vw, 1925px\" \/><\/p>\n<p>In this blog, we\u2019ll show you how to create a reusable, dynamic review card component in Power Pages using custom web templates. This allows you to display customer reviews in a visually engaging way\u2014perfect for product pages, homepages, or testimonial sections.<\/p>\n<p>In the world of e-commerce, showcasing product reviews effectively is key to building trust with customers. <a href=\"https:\/\/make.powerpages.microsoft.com\/\">Power Pages<\/a>, a part of Microsoft&#8217;s Power Platform, enables users to build professional-grade websites quickly and with minimal coding effort.<\/p>\n<p>One powerful way to enhance the user experience is by displaying product reviews as visually engaging cards. Using custom web templates, you can create dynamic review components that not only look great but are also reusable across different pages of your portal.<\/p>\n<p>With just one well-structured template, you can show different reviews on your homepage, product pages, or testimonial sections \u2014 simply by configuring different property values such as reviewer name, text, rating, and profile image. This approach streamlines content management and ensures design consistency across your site.<\/p>\n<h2><strong>Preparation<\/strong><\/h2>\n<p>Prior to implementing the code, please confirm that the following setup has been completed:<\/p>\n<p><strong>1. Set up a custom table <\/strong>within your environment.<br \/>\nInclude the following columns:<\/p>\n<ul>\n<li>Name (Single Line of Text &#8211; Plain Text)<\/li>\n<li>Content (Multiple Lines of Text &#8211; Plain Text)<\/li>\n<li>Rating (Number &#8211; Whole number Range (1\u201310))<\/li>\n<\/ul>\n<p><strong>2. Add a few sample records<\/strong> to your new table so you can see how the reviews will appear on the page.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-41054\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/1Web-Template-in-Power-Pages.png\" alt=\"Web Template in Power Pages\" width=\"1919\" height=\"869\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/1Web-Template-in-Power-Pages.png 1919w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/1Web-Template-in-Power-Pages-300x136.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/1Web-Template-in-Power-Pages-1024x464.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/1Web-Template-in-Power-Pages-768x348.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/1Web-Template-in-Power-Pages-1536x696.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/1Web-Template-in-Power-Pages-660x299.png 660w\" sizes=\"(max-width: 1919px) 100vw, 1919px\" \/><\/p>\n<p><strong>3.<\/strong> In the Security workspace, grant read access by adding a<strong> table permission <\/strong>and assigning it to the relevant <strong>web roles<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-41055\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/2Web-Template-in-Power-Pages.png\" alt=\"Web Template in Power Pages\" width=\"1919\" height=\"871\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/2Web-Template-in-Power-Pages.png 1919w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/2Web-Template-in-Power-Pages-300x136.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/2Web-Template-in-Power-Pages-1024x465.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/2Web-Template-in-Power-Pages-768x349.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/2Web-Template-in-Power-Pages-1536x697.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/2Web-Template-in-Power-Pages-660x300.png 660w\" sizes=\"(max-width: 1919px) 100vw, 1919px\" \/><\/p>\n<p><strong>4. Copy the logical name<\/strong> of your custom table (e.g., cr90b_review). You\u2019ll use this in the FetchXML and throughout the template.<\/p>\n<h3><strong>Set Up the Web Template<\/strong><\/h3>\n<p>Navigate to the Power Pages Management App, select &#8220;<strong>Web Templates<\/strong>&#8221; from the site map, create a new web template in your environment, and paste the following HTML + Liquid code.<\/p>\n<h3><strong>Web Template Code<\/strong><\/h3>\n<pre class=\"lang:css gutter:true start:1\">{% fetchxml postsQuery %}\r\n\r\n&lt;fetch mapping='logical'&gt;\r\n\r\n&lt;entity name='cr90b_review'&gt;\r\n\r\n&lt;attribute name='cr90b_name' \/&gt;\r\n\r\n&lt;attribute name='cr90b_content' \/&gt;\r\n\r\n&lt;attribute name='cr90b_rating' \/&gt;\r\n\r\n&lt;attribute name='createdon' \/&gt;\r\n\r\n&lt;order attribute='createdon' descending='false' \/&gt;\r\n\r\n&lt;\/entity&gt;\r\n\r\n&lt;\/fetch&gt;\r\n\r\n{% endfetchxml %}\r\n\r\n{% assign posts_count = count | integer %}\r\n\r\n{% assign column_count = columns | integer %}\r\n\r\n{% assign cutoff = cutoff | integer %}\r\n\r\n&lt;h2&gt;{{ name | default: \"Feedback entries (default)\" }}\r\n\r\n&lt;\/h2&gt;\r\n\r\n&lt;span&gt;Showing {{ posts_count }} out of {{ postsQuery.results.entities.size }}&lt;\/span&gt;\r\n\r\n{% if postsQuery.results.entities.size &gt; 0 %}\r\n\r\n&lt;div class=\"col-sm-12\"&gt;\r\n\r\n&lt;ul style=\"list-style:none\" class=\"grid\"&gt;\r\n\r\n{% for post in postsQuery.results.entities limit: posts_count %}\r\n\r\n&lt;li class=\"col-md-{{ 12 | divided_by: column_count }}\"&gt;\r\n\r\n&lt;div class=\"panel panel-{% if post.cr90b_rating &lt; cutoff %}danger{%elsif post.cr90b_rating == cutoff%}warning{%elsif post.cr90b_rating == 10%}success{% else %}default{% endif %}\"&gt;\r\n\r\n&lt;div class=\"panel-heading\"&gt;{{ post.cr90b_name }}\r\n\r\n&lt;span class=\"badge\" style=\"float:right\"&gt;{{ post.cr90b_rating }}&lt;\/span&gt;\r\n\r\n&lt;\/div&gt;\r\n\r\n&lt;div class=\"panel-body\" style=\"height:150px\"&gt;\r\n\r\n&lt;p&gt;{{ post.cr90b_content }}&lt;\/p&gt;\r\n\r\n&lt;\/div&gt;\r\n\r\n&lt;div class=\"panel-footer\" style=\"height:55px\"&gt;\r\n\r\n&lt;span&gt;{{ post.createdon }}&lt;\/span&gt;\r\n\r\n{% if post.cr90b_rating &lt; cutoff %}\r\n\r\n&lt;button\r\n\r\ntype=\"button\"\r\n\r\nclass=\"btn btn-danger\"\r\n\r\nstyle=\"float:right\"\r\n\r\nonclick=\"alert('Flagging this review!')\"&gt;\r\n\r\n&lt;span class=\"glyphicon glyphicon-flag\" aria-hidden=\"true\"&gt;&lt;\/span&gt;\r\n\r\n&lt;\/button&gt;\r\n\r\n{% endif %}\r\n\r\n&lt;\/div&gt;\r\n\r\n&lt;\/div&gt;\r\n\r\n&lt;\/li&gt;\r\n\r\n{% endfor %}\r\n\r\n&lt;\/ul&gt;\r\n\r\n&lt;\/div&gt;\r\n\r\n{% if postsQuery.results.entities.size &gt; count %}\r\n\r\n&lt;hr\/&gt;\r\n\r\n&lt;button\r\n\r\nonclick=\"alert('Not yet implemented :)')\"\r\n\r\nclass=\"button1\"\r\n\r\nstyle=\"margin: 0 auto; display:block\"&gt;{{ load_more_label | default: \"Load More\" }}&lt;\/button&gt;\r\n\r\n{% endif %}\r\n\r\n{% endif %}<\/pre>\n<h3><strong>Manifest Block<\/strong><\/h3>\n<p>Below the HTML, add the manifest to define template properties:<\/p>\n<pre class=\"lang:css gutter:true start:1\">{% manifest %}\r\n\r\n{\r\n\r\n\"type\": \"Functional\",\r\n\r\n\"displayName\": \"Posts\",\r\n\r\n\"description\": \"Shows all posts\",\r\n\r\n\"tables\": [\"cr90b_review\"],\r\n\r\n\"params\": [\r\n\r\n{\r\n\r\n\"id\": \"name\",\r\n\r\n\"displayName\": \"Title\",\r\n\r\n\"description\": \"Let's give it a title\"\r\n\r\n},\r\n\r\n{\r\n\r\n\"id\": \"count\",\r\n\r\n\"displayName\": \"Count\",\r\n\r\n\"description\": \"No. of items\"\r\n\r\n},\r\n\r\n{\r\n\r\n\"id\": \"columns\",\r\n\r\n\"displayName\": \"# of Columns\",\r\n\r\n\"description\": \"less than 12\"\r\n\r\n},\r\n\r\n{\r\n\r\n\"id\": \"cutoff\",\r\n\r\n\"displayName\": \"Limit for review\",\r\n\r\n\"description\": \"Number between 1 and 10\"\r\n\r\n},\r\n\r\n{\r\n\r\n\"id\": \"load_more_label\",\r\n\r\n\"displayName\": \"Load more label\",\r\n\r\n\"description\": \"\"\r\n\r\n}\r\n\r\n]\r\n\r\n}\r\n\r\n{% endmanifest %}<\/pre>\n<p>Replace all instances of cr90b_review and its attribute prefixes (cr90b_) with the schema name from your custom table. Then, add this code to the source field of the web template record. Users can also edit this code by opening it in <strong>VSCode for the web<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-41056\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/3Web-Template-in-Power-Pages.png\" alt=\"Web Template in Power Pages\" width=\"1919\" height=\"868\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/3Web-Template-in-Power-Pages.png 1919w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/3Web-Template-in-Power-Pages-300x136.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/3Web-Template-in-Power-Pages-1024x463.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/3Web-Template-in-Power-Pages-768x347.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/3Web-Template-in-Power-Pages-1536x695.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/3Web-Template-in-Power-Pages-660x299.png 660w\" sizes=\"(max-width: 1919px) 100vw, 1919px\" \/><\/p>\n<h3><strong>Use the Web Template<\/strong><\/h3>\n<p>You can now embed this component on any page using either <strong>Visual Studio Code for the Web<\/strong> or the <strong>Design Studio<\/strong>. Your template will be available in the <strong>Custom Components<\/strong> section.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-41057\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/4Web-Template-in-Power-Pages.png\" alt=\"Web Template in Power Pages\" width=\"1913\" height=\"870\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/4Web-Template-in-Power-Pages.png 1913w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/4Web-Template-in-Power-Pages-300x136.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/4Web-Template-in-Power-Pages-1024x466.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/4Web-Template-in-Power-Pages-768x349.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/4Web-Template-in-Power-Pages-1536x699.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/4Web-Template-in-Power-Pages-660x300.png 660w\" sizes=\"(max-width: 1913px) 100vw, 1913px\" \/><\/p>\n<h3><strong>Reusability &amp; Flexibility<\/strong><\/h3>\n<p>This web template is designed with reusability in mind. It can be seamlessly integrated across <strong>multiple pages of your website<\/strong>, allowing you to maintain a consistent layout while showcasing different content.<\/p>\n<p>By clicking on <strong>&#8220;Edit Custom Component&#8221;<\/strong>, you can easily <strong>configure the properties<\/strong> of the review card.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-41058\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/5Web-Template-in-Power-Pages.png\" alt=\"Web Template in Power Pages\" width=\"1919\" height=\"876\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/5Web-Template-in-Power-Pages.png 1919w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/5Web-Template-in-Power-Pages-300x137.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/5Web-Template-in-Power-Pages-1024x467.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/5Web-Template-in-Power-Pages-768x351.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/5Web-Template-in-Power-Pages-1536x701.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/5Web-Template-in-Power-Pages-660x301.png 660w\" sizes=\"(max-width: 1919px) 100vw, 1919px\" \/><\/p>\n<p>In <strong>Visual Studio Code<\/strong>, you can add the following snippet:<\/p>\n<p>{% include &#8216;Reviews&#8217; name:&#8217;Product Reviews&#8217; count:&#8217;6&#8242; columns:&#8217;6&#8242; cutoff:&#8217;6&#8242; load_more_label:&#8217;Load more entries&#8217; %}<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-41059\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/6Web-Template-in-Power-Pages.png\" alt=\"Web Template in Power Pages\" width=\"1915\" height=\"837\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/6Web-Template-in-Power-Pages.png 1915w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/6Web-Template-in-Power-Pages-300x131.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/6Web-Template-in-Power-Pages-1024x448.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/6Web-Template-in-Power-Pages-768x336.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/6Web-Template-in-Power-Pages-1536x671.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/6Web-Template-in-Power-Pages-660x288.png 660w\" sizes=\"(max-width: 1915px) 100vw, 1915px\" \/><\/p>\n<p>To test and reuse the template, navigate to the page where it&#8217;s embedded, and the reviews will appear in a card layout using Bootstrap&#8217;s panel component. You can easily reuse the component across different pages by updating the include parameters. For a better user experience, consider adding additional styling, animations, or icons, and plan to implement pagination with a &#8220;Load More&#8221; button in the future.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-41060\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/7Web-Template-in-Power-Pages.png\" alt=\"Web Template in Power Pages\" width=\"1919\" height=\"870\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/7Web-Template-in-Power-Pages.png 1919w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/7Web-Template-in-Power-Pages-300x136.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/7Web-Template-in-Power-Pages-1024x464.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/7Web-Template-in-Power-Pages-768x348.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/7Web-Template-in-Power-Pages-1536x696.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/04\/7Web-Template-in-Power-Pages-660x299.png 660w\" sizes=\"(max-width: 1919px) 100vw, 1919px\" \/><\/p>\n<h3><strong>Conclusion<\/strong><\/h3>\n<p>Custom web templates in Power Pages provide a versatile and reusable solution for showcasing product reviews in a card-style layout. With configurable properties, you can use the same template across multiple pages while showing different content. This approach ensures consistency, saves time, and enhances the overall user experience.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we\u2019ll show you how to create a reusable, dynamic review card component in Power Pages using custom web templates. This allows you to display customer reviews in a visually engaging way\u2014perfect for product pages, homepages, or testimonial sections. In the world of e-commerce, showcasing product reviews effectively is key to building trust\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2025\/04\/how-to-create-reusable-custom-component-using-web-template-in-power-pages\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2763,2848,2361],"tags":[2743],"class_list":["post-41062","post","type-post","status-publish","format-standard","hentry","category-power-pages","category-power-platform","category-technical","tag-power-pages"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/41062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=41062"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/41062\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=41062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=41062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=41062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}