web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / How to add logic in th...
Power Pages
Answered

How to add logic in the Header Web Template to check the current Web Page Name?

(0) ShareShare
ReportReport
Posted on by 314 Super User 2024 Season 1

Hi team happy new year,

 

Just wondering what can i insert in the header template so that it knows the current web page name? I tried {{ page.title }} but it seems casching.... for example, i open the home page, then the {{ page.title }} equals Home, then i opened another page, the {{ page.title }} still equals Home, after a couple times refresh, it then changed to the correct web page name. What can i do to overcome this issue?

 

Cheers,

Dom

Categories:
I have the same question (0)
  • fm_skeller Profile Picture
    277 Moderator on at

    I think this behaviour is because of the default header and footer output caching, as described here:
    Enable header and footer output caching on Power Pages | Microsoft Learn
    You could try using the {% substituion %} liquid tag - or consider disabling the output caching, but this will have a performance impact. So only do this if it is absolutely necessary and there is no other option.

  • Verified answer
    Lucas001 Profile Picture
    2,504 Super User 2026 Season 1 on at

    Hi @domliu,

     

    as you both already mentioned the problem is based on chaching.

    I am not 100% sure if that will work but getting the URL of the page with liquid, like done here: https://community.shopify.com/c/shopify-discussions/how-to-get-full-current-custom-page-url-in-liquid/m-p/1250981 could work.

     

    Otherwise I guess JS is the only option to further manipulate your page.



    --------------------------------------------------------------------------------------

    Hope that helps.

    If the post solves your problem, please mark it as solution. If it helps, consider a thumbs up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 39

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 28 Most Valuable Professional

#3
Fubar Profile Picture

Fubar 20 Super User 2026 Season 1

Last 30 days Overall leaderboard