Open bhsmither opened 10 months ago
More experiments give this:
In controller.admin.session.true.inc.php, find:
if (isset($_GET['_g']) && !empty($_GET['_g']) && $_GET['_g'] != 'plugins') {
$GLOBALS['gui']->addBreadcrumb(ucwords($_GET['_g']));
}
Add after:
$GLOBALS['seo']->set_meta_data([
'name' => ucfirst(preg_replace('/[^a-z0-9._-]/', '', $_GET['node'] ?? $_GET['_g'] ?? 'dashboard')),
'title' => ucfirst(preg_replace('/[^a-z0-9._-]/', '', $_GET['node'] ?? $_GET['_g'] ?? 'dashboard'))
]);
$GLOBALS['seo']->displayMetaData();
Do not use importNode()
.
However, this uses the script name, which in some cases, does not accurately match the actual name of the section. Also, there is no incorporation of phrases from the language pack.
This is cool. Same it's not so accurate with the name. I think there needs to be some manual mapping which is a shame.
Feature Request:
Similar in concept to deriving and sending Meta information to the storefront templates, also derive and send Meta information to the admin templates.
My experiments suggest:
This does not yet find the Dashboard. Nor does it use the $node if not empty.
This puts, for example,
Statistics - My Store - Admin Control Panel
on the browser's header and tab.This is convenient when one has many browser windows open, or many tabs open in one browser -- where otherwise all of them saying just
Admin Control Panel
.