Lindsey
6 years agoLeader
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 tab to show Foo Labels. Basically, I want our page title to be {0} Labels.
Is there a way to pass parameters into the page title like that?
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.