Use Liquid
Power Pages functionality can be extended with pro-code methods. The Liquid markup language provides many methods to extend the functionality of your site.
For detailed information on how to use Liquid on your site, go to Liquid overview in the Power Apps documentation.