Titles for loading.tsx
Unanswered
Alvin Joy posted this in #help-forum
Hi, Is there a way to have the page titles (metadata titles) for the loading pages be dynamically generated based on the page that is going to be visited?
Ie. is something like
Ie. is something like
title.template field which can be used in layout.tsx present in loading.tsx?3 Replies
anyone help please?
Blue orchard bee
Have you looked at this? https://nextjs.org/docs/app/building-your-application/optimizing/metadata#dynamic-metadata
As for using the site's metadata in the site itself, you can do that natively with document.title
https://developer.mozilla.org/en-US/docs/Web/API/Document/title
https://developer.mozilla.org/en-US/docs/Web/API/Document/title