{"id":40014,"date":"2024-12-18T12:47:21","date_gmt":"2024-12-18T07:17:21","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=40014"},"modified":"2024-12-19T11:17:58","modified_gmt":"2024-12-19T05:47:58","slug":"add-a-custom-component-preview-in-the-power-pages-portal","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2024\/12\/add-a-custom-component-preview-in-the-power-pages-portal\/","title":{"rendered":"Add a Custom Component (Preview) in the Power Pages Portal"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40025\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal.png\" alt=\"Custom Component in Power Pages Portal\" width=\"1925\" height=\"1100\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal.png 1925w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-300x171.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-1024x585.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-768x439.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-1536x878.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-660x377.png 660w\" sizes=\"(max-width: 1925px) 100vw, 1925px\" \/><\/p>\n<p style=\"text-align: justify;\">During a recent project, a client wanted a consistent banner design across multiple pages in Power Pages Design Studio, with customizable text displayed over the banner and it was a repeated task for the client. Also, the client had basic knowledge of the <a href=\"https:\/\/www.inogic.com\/services\/microsoft-power-platform\/microsoft-power-pages\/\" target=\"_blank\" rel=\"noopener\">Power Pages<\/a> Design Studio but they were not familiar with Power Pages Management which is linked with coding.<\/p>\n<p style=\"text-align: justify;\">To overcome this scenario, we have created a custom component for the client, and now the client is using the same custom component in the designer studio for multiple pages with different values\/data.<\/p>\n<h3 style=\"text-align: justify;\"><strong>Step-by-Step Guide: To create a Custom Component in Power Pages Portal<\/strong><\/h3>\n<p style=\"text-align: justify;\">First, we have to create a Web Template in which you can allow a maker to pass parameters, you need to add a\u00a0<strong>{% manifest %}<\/strong>\u00a0tag to the web template.<\/p>\n<p style=\"text-align: justify;\">The manifest is a JSON object that defines the properties of the web template displayed in the design studio. The parameters relate to variables that developers use in their source code, and low-code makers can configure their values.<\/p>\n<p style=\"text-align: justify;\">Here\u2019s a breakdown of the key properties used when configuring the <strong>{% manifest %}<\/strong> tag in a Web Template for a Custom Component:<\/p>\n<h3 style=\"text-align: justify;\"><strong>Manifest Properties<\/strong><\/h3>\n<ol style=\"text-align: justify;\">\n<li><strong>type<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify;\">By setting the <strong>type<\/strong> to <strong>\u2018Functional\u2019<\/strong>, you enable the web template component to be added via the <strong>\u201cAdd component\u201d<\/strong> process in Design Studio.<\/p>\n<ol style=\"text-align: justify;\" start=\"2\">\n<li><strong>displayName<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify;\">A friendly name for the web template component<\/p>\n<ol style=\"text-align: justify;\" start=\"3\">\n<li><strong>description<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify;\">A brief explanation of the web template component<\/p>\n<ol style=\"text-align: justify;\" start=\"4\">\n<li><strong>tables<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify;\">This specifies which Dataverse tables the web template can interact with. The logical names of the tables must be listed to ensure correct linking and data flow.<\/p>\n<ol style=\"text-align: justify;\" start=\"5\">\n<li><strong>params<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Set of parameters with specific properties that define their usage.<\/p>\n<h3 style=\"text-align: justify;\"><strong>Properties of params<\/strong>:<\/h3>\n<ul style=\"text-align: justify;\">\n<li><strong>id<\/strong>: This should match the variable used in the web template code and the Liquid include tag.<\/li>\n<li><strong>displayName<\/strong>: The user-friendly name that appears in Design Studio, allowing makers to recognize the parameter easily.<\/li>\n<li><strong>description<\/strong>: A short tooltip-like text providing context to makers on what the parameter does or how it should be used.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">We created a Banner Component that accepts the URL of the banner Image, Title, and Subtitle as a parameter in the custom component with the below source code.<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40015\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-1.png\" alt=\"Custom Component in Power Pages Portal \" width=\"812\" height=\"821\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-1.png 812w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-1-297x300.png 297w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-1-768x777.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-1-660x667.png 660w\" sizes=\"(max-width: 812px) 100vw, 812px\" \/><\/p>\n<pre class=\"lang:css gutter:true start:1\">{% manifest %}\r\n{\r\n\"type\": \"Functional\",\r\n\"displayName\": \"Banner\",\r\n\"description\": \"This component displays banner with there title\",\r\n\"tables\": [\"account\"],\r\n\"params\": [\r\n{\r\n\"id\": \"bannerUrl\",\r\n\"displayName\": \"Banner Image URL\",\r\n\"description\": \"Banner url which displayed in background\"\r\n},\r\n{\r\n\"id\": \"title\",\r\n\"displayName\": \"Title\",\r\n\"description\": \"Title of product\"\r\n},\r\n{\r\n\"id\": \"subtitle\",\r\n\"displayName\": \"Subtitle\",\r\n\"description\": \"Subtitle of product\"\r\n}]\r\n}\r\n{% endmanifest %}\r\n&lt;!--additional web template code to use parameters to specialized functionality--&gt;\r\n{% assign banner_url = bannerUrl %}\r\n{% assign banner_Title = title %}\r\n{% assign banner_Subtitle = subtitle %}\r\n&lt;div class=\"banner\"&gt;\r\n&lt;img src=\"{{banner_url}}\" alt=\"{{banner_Title}} Banner\" class=\"banner-image\"&gt;\r\n&lt;div class=\"banner-content\"&gt;\r\n&lt;h1&gt;{{banner_Title}}&lt;\/h1&gt;\r\n&lt;p&gt;{{banner_Subtitle}}&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p style=\"text-align: justify;\">Once the Web Template with the <strong>{% manifest %}<\/strong> tag is created, it will automatically appear in the Power Pages Design Studio.<\/p>\n<p style=\"text-align: justify;\">To use the custom component please follow the below steps:<\/p>\n<ol style=\"text-align: justify;\">\n<li>Open the Power Pages Design Studio and navigate to the web page where you want to add the component<\/li>\n<li>Then click on the three dots (More options) at the bottom of the page editor -&gt; All available custom components will appear, listed with the name you provided in the manifest tag (e.g., &#8220;Banner&#8221;).<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40016\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-2.png\" alt=\"Custom Component in Power Pages Portal \" width=\"1882\" height=\"795\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-2.png 1882w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-2-300x127.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-2-1024x433.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-2-768x324.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-2-1536x649.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-2-660x279.png 660w\" sizes=\"(max-width: 1882px) 100vw, 1882px\" \/><\/p>\n<p style=\"text-align: justify;\">Once the custom component is added now click on the <strong>Edit Custom Component<\/strong> tab it will open a popup where we can provide values for the parameters declared in the <strong>manifest <\/strong>tag.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40017\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-3.png\" alt=\"Custom Component in Power Pages Portal \" width=\"1343\" height=\"659\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-3.png 1343w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-3-300x147.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-3-1024x502.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-3-768x377.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-3-660x324.png 660w\" sizes=\"(max-width: 1343px) 100vw, 1343px\" \/><\/p>\n<p style=\"text-align: justify;\">In our scenario, we have passed values to the parameters which are <strong>Banner Image URL<\/strong>, <strong>Title<\/strong>, and <strong>Subtitle<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40018\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-4.png\" alt=\"Custom Component in Power Pages Portal \" width=\"950\" height=\"634\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-4.png 950w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-4-300x200.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-4-768x513.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-4-660x440.png 660w\" sizes=\"(max-width: 950px) 100vw, 950px\" \/><\/p>\n<p style=\"text-align: justify;\">After passing the values to the parameters it will dynamically render the component on the page.<\/p>\n<p style=\"text-align: justify;\">In our scenario, it looks like below:<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40019\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-5.png\" alt=\"Custom Component in Power Pages Portal \" width=\"1299\" height=\"699\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-5.png 1299w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-5-300x161.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-5-1024x551.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-5-768x413.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-5-660x355.png 660w\" sizes=\"(max-width: 1299px) 100vw, 1299px\" \/><\/p>\n<p style=\"text-align: justify;\">To showcase the reusability of the <strong>Custom Banner Component<\/strong>, we added another page and used the same component while passing a different <strong>Banner Image URL<\/strong>, <strong>Title<\/strong>, and <strong>Subtitle<\/strong> value highlighting its flexibility and ease of use across multiple pages.<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40020\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-6.png\" alt=\"Custom Component in Power Pages Portal \" width=\"1261\" height=\"744\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-6.png 1261w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-6-300x177.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-6-1024x604.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-6-768x453.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-6-660x389.png 660w\" sizes=\"(max-width: 1261px) 100vw, 1261px\" \/><\/p>\n<p style=\"text-align: justify;\">Result in the designer studio<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40021\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-7.png\" alt=\"Custom Component in Power Pages Portal \" width=\"904\" height=\"461\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-7.png 904w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-7-300x153.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-7-768x392.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-7-660x337.png 660w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/p>\n<p style=\"text-align: justify;\">Final output on the preview website<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"alignnone size-full wp-image-40022\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-8.png\" alt=\"Custom Component in Power Pages Portal \" width=\"1683\" height=\"864\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-8.png 1683w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-8-300x154.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-8-1024x526.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-8-768x394.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-8-1536x789.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-8-660x339.png 660w\" sizes=\"(max-width: 1683px) 100vw, 1683px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40023\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-9.png\" alt=\"Custom Component in Power Pages Portal \" width=\"1481\" height=\"896\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-9.png 1481w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-9-300x181.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-9-1024x620.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-9-768x465.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/12\/Custom-Component-in-Power-Pages-Portal-9-660x399.png 660w\" sizes=\"(max-width: 1481px) 100vw, 1481px\" \/><\/p>\n<h2 style=\"text-align: justify;\"><strong>Conclusion<\/strong>:<\/h2>\n<p style=\"text-align: justify;\">With the custom component, you can easily create multiple components tailored to your specific business requirements, offering flexibility and scalability for your website design<\/p>\n<pre class=\"lang:css gutter:true start:1\"><a href=\"https:\/\/www.inogic.com\/services\/microsoft-power-platform\/microsoft-power-apps-canvas-app\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone wp-image-36562 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/11\/Canvas-App.gif\" alt=\"Canvas App\" width=\"800\" height=\"200\" \/><\/a><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>During a recent project, a client wanted a consistent banner design across multiple pages in Power Pages Design Studio, with customizable text displayed over the banner and it was a repeated task for the client. Also, the client had basic knowledge of the Power Pages Design Studio but they were not familiar with Power Pages\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2024\/12\/add-a-custom-component-preview-in-the-power-pages-portal\/\">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],"tags":[2901],"class_list":["post-40014","post","type-post","status-publish","format-standard","hentry","category-power-pages","tag-power-pages-portal"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/40014","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=40014"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/40014\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=40014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=40014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=40014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}