Dynamic title tag in header
Permalink
Hello,
I have a single page that pulls content from a separate database. I'd like the title tag in the page header to change based on the external content. I see the title tag is generated in header_required.php in the elements directory, however it seems it can only be set by setting the meta_title or changing the collection name (neither of which seems to make sense in my case). There seems to be some code:
$pageTitle = (!$pageTitle) ? $c->getCollectionName() : $pageTitle;
that appears to allow you to override the title, however the variable is overridden before being used again.
Hoping to avoid header_required.php override.
Thanks,
Stephen
I have a single page that pulls content from a separate database. I'd like the title tag in the page header to change based on the external content. I see the title tag is generated in header_required.php in the elements directory, however it seems it can only be set by setting the meta_title or changing the collection name (neither of which seems to make sense in my case). There seems to be some code:
$pageTitle = (!$pageTitle) ? $c->getCollectionName() : $pageTitle;
that appears to allow you to override the title, however the variable is overridden before being used again.
Hoping to avoid header_required.php override.
Thanks,
Stephen