Using page title (from the head tag) in the body of a node SPA

I’d like to have a dynamic page title displayed in the header of a node site.

I have the template data setup, and the <title> tag is dynamically changing in the <head>.

I can display that same title (in the body of the page) on initial load of the layout and content using:
<%=_('page_title')%>

For example, indie of a link:
<a class="navbar-brand mr-auto" href="#"><%=_('page_title')%></a>

However, being an SPA, I’m using links with the Internal option, so while the <title> tag does update, the display of that title in the link, never changes.

In the video below, you can see that the url changes on click, as does the title tag and tab display, however the link display (next to the hamburger) stays with its original page load value.

I’ve also tried using dmx-text on page_title, however that never displays any value.

How can I have the link update as well?

Where is the page_title coming from, do you set this in a server connect action?

It comes from the content pages properties, but is static.

The server-side bindings are rendered on the server, the client doesn’t have access to this data. We are looking for ways to make the server-side data available within App Connect.

2 Likes