how do people update the title with hotwire? are people still using this hack?
<head>
<title id="page-title">My Title</title>
</head>
<body>
<turbo-frame data-turbo-action="advance" ...>
<turbo-frame>
</body>
<turbo-frame ...>
<turbo-stream action="update" target="page-title">
<template>New Title</template>
</turbo-stream>
Content...
<turbo-frame>
Here is another idea:
and then set
titleattribute on your other frame:If you render your
applicationlayout instead of the default frame layout the title will be updated automatically:One other way is to render your entire head tag, which will cause it to be merged with the current page head tag: