Feature #87037
closedPage Title API: Pass the title generated by the previous provider to the current
0%
Description
Description¶
Having a way to retrieve the title generated by the previous PageTitleProvider to the current PageTitleProvider or a similar functionality would increase the flexibility of the Page Title API drastically. In addition to that it can be an alternative to the already deprecated UserFunc config.titleTagFunction
Scenarios like the following can be realized with small effort¶
- Processing the title string based on existing words makes enriching the title string with automatic easier
- The API can be used to check the length and e.g. log or notify the marketeers about a possible too long page title
- Rewriting/replacing words based on a actual page property for example. E.g. Removal of the prefixed/suffixed siteTitle
Updated by Richard Haeser almost 6 years ago
- Target version set to Candidate for Major Version
Updated by Georg Ringer over 4 years ago
- Status changed from New to Closed
Thanks for creating the issue! The concept of page title providers works the way that the 1st page provider which delivers a title is used. For fulfilling your case the logic would be needed to change so that the lowest provider would be called 1st, then the next and so on. This would not only be breaking but also lower the performance.
However, there are several options you can use.
1st: The final page title is using still stdWrap config.pageTitle
which can be used to alter stuff
2nd: in your custom provider you can still access e.g. $GLOBALS['TSFE']->page['title'];