I have a requirement to build the title of a custom content type using some node fields and additional conditions that I can't reproduce using the tokens provided, so I have hooked to the page title API (
hook_page_title_alter(&$title)) to build my custom title only for one node type.
The function works and the page title is set. But the meta tags are wrong, they are not using the page title found in
<HEAD>) but the node's title which I don't want to use.
How do I feed metatags module with my custom title ? I am out of ideas, so anything is appreciated.
As commented by someone you don't need the page_title module if you use metatags, but page_title provides an API with hooks to alter the page title, and that's what I am using and what I need to use, so maybe the question could be reformulated to "How do I alter the page title generated by metatags?"