Feature Request - Tweak header_required.php to use PAGE_TITLE_FORMAT when meta title is used
Permalink
I think it would be awesome if the header_required.php could be modified ever so slightly so that you can use the PAGE_TITLE_FORMAT constant in the config file, whether or not the page has a meta title value set.
At the moment, if you give a page a meta title value, it effectively "hard codes" the page title format:
It would make perfect sense to me to use PAGE_TITLE_FORMAT in both cases, because it's such a simple yet powerful way to give access to modify a page's title format without having to use overrides e.g.
You could even pass the meta title in as a third, additional parameter if available, rather than overwriting the page name, but that would depend on how far you want to take it.
Thanks for reading!
Nikki
At the moment, if you give a page a meta title value, it effectively "hard codes" the page title format:
if ($akt) { $pageTitle = $akt; ?><title><?php echo htmlspecialchars($akt, ENT_COMPAT, APP_CHARSET)?></title> <?php } else { $pageTitle = htmlspecialchars($pageTitle, ENT_COMPAT, APP_CHARSET); ?><title><?php echo sprintf(PAGE_TITLE_FORMAT, SITE, $pageTitle)?></title> <?php }
It would make perfect sense to me to use PAGE_TITLE_FORMAT in both cases, because it's such a simple yet powerful way to give access to modify a page's title format without having to use overrides e.g.
if ($akt) { $pageTitle = htmlspecialchars($akt, ENT_COMPAT, APP_CHARSET); ?><title><?php echo sprintf(PAGE_TITLE_FORMAT, SITE, $pageTitle)?></title> <?php } else { $pageTitle = htmlspecialchars($pageTitle, ENT_COMPAT, APP_CHARSET); ?><title><?php echo sprintf(PAGE_TITLE_FORMAT, SITE, $pageTitle)?></title> <?php }
You could even pass the meta title in as a third, additional parameter if available, rather than overwriting the page name, but that would depend on how far you want to take it.
Thanks for reading!
Nikki