Forum Discussion

Lindsey's avatar
Lindsey
Leader
6 years ago

Custom page title with variable

We created a custom labels search page on our community. I want the page title and browser tab to vary with the label the user is searching, like if they search "Foo" label, then I want the browser t...
  • Parshant's avatar
    Parshant
    6 years ago

    Lindsey,

    Yes you are correct we cannot change Custom Page titles Dynamically with freemarker and text-keys.

    But if its just for display purposes you can use javascript code in custom component and include to the custom page to change with Dynamic values.

    <#assign Pagetitle = coreNode.title />
    <script>
     document.title = "${Pagetitle}";
    </script>

     I know this method is not good but, its the only solution I have.