Project

General

Profile

Actions

Feature #87037

closed

Page Title API: Pass the title generated by the previous provider to the current

Added by Josef Glatz almost 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
SEO
Start date:
2018-11-29
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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
Actions #1

Updated by Josef Glatz almost 6 years ago

  • Description updated (diff)
Actions #2

Updated by Richard Haeser almost 6 years ago

  • Target version set to Candidate for Major Version
Actions #3

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'];

Actions

Also available in: Atom PDF