Placement in Power Portal
About the Author: Manish Luhana
Microsoft business applications specialist and certified trainer.
Categories: Portals, Power Apps, Power Platform0 CommentsPublished On: 4 December 2021

add-powers-apps

The concepts of ads and ad placement in power portals. Because power portals are public-facing websites, we can place advertisements on any of the power portal’s web pages. Let’s see what we can do with this. Create text or image-based advertising and place them around your site in a variety of locations. Place ads at random or choose certain ads for specified positions. For time-sensitive, planned content, you can set release and expiration dates. Advertisements can link to any location and open in the same or a new window. The Ad Placement table and the related Ad table are the two tables that display advertisements in the site. Ads can be shown in a variety of methods, including using pre-made Liquid Templates available via portals via Liquid Templating/example Web Templates, or using MVC actions within the.aspx page.

1. Create Ad Records in the Portal Management Model Driven App.

Open the Apps area after logging into Power Apps. Choose an app that is powered by the Portal Management Model. Navigate to the Ads option from the sitemap in the Portal Management Model controlled app.

portal-management-model

Create a new ad by clicking the Create New Ad button. Provide a name, such as “Discount AD,” and select Custom Portal or the portal of your choice as the website. The date from which you want the ad to go live is known as the release date. The day on which the ad will stop appearing on portals is called the expiration date. The status of the publishing is set to Published. Save the ad record now.

displaying-on-portals

After saving the same Ad record, go to the Content Page and customize the overall appearance of your ad. To write HTML code, go to the HTML section. Here is the HTML code.

discount-add

Continue to the following stage after saving the Ad record.

2. Start making an Ad Placement record and link it to the Ad record.

Make a new ad placement option from the sitemap. Give it a name and the URL of your website.

placement-record

Save, then go to the Ads Tab and select the Add Existing option to link the Ad record to it.

placement-record (1)

After completing the above procedures, go to the following step to display the ad on the main page.

3. To display an ad, add code to the web template.

Open the Web Template for the page where you wish to show the advertisement. For example, suppose you want to put an advertisement on the main page. Go to the Web Pages option and type in “Home” in the search box. Check which Page Template is linked with the Webpage record. Check which Web Template is related with the Page Template by clicking on it. Open the Web Template record and replace the old code with the following line of code.

Include the right ad name as well as the name of the ad location.

{% include “ad” ad_name:”Discount AD” ad_placement_name:”Discount AD Placement” %}

Lastly save the website template and run the website by clearing the cache. The advertisement has displayed on the portal.

power-portals

tech mentor sidebanner
  • Continue reading
  • Continue reading
  • Continue reading
  • Continue reading
  • Continue reading

Leave A Comment