1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 22:27:34 +02:00

Fixes #3163 Strip the title "News" if page is the frontpage

Removes any additional title (like "News - ") when current page is the frontpage.
e.g. `<title>News - My great website</title>` will become `<title>My great website</title>` if the page is opened as frontpage (Admin -> Settings -> Frontpage)
This commit is contained in:
Achim
2018-06-25 13:58:10 +02:00
committed by GitHub
parent 1edd4a008f
commit 1b3460cf3d

View File

@@ -165,7 +165,15 @@ unset($e_headers);
// echo e107::getUrl()->response()->renderMeta()."\n"; // render all the e107::meta() entries.
echo e107::getSingleton('eResponse')->renderMeta()."\n";
echo "<title>".(defined('e_PAGETITLE') ? e_PAGETITLE.' - ' : (defined('PAGE_NAME') ? PAGE_NAME.' - ' : "")).SITENAME."</title>\n\n";
if (deftrue('e_FRONTPAGE'))
{
// Ignore any additional title when current page is the frontpage
echo "<title>".SITENAME."</title>\n\n";
}
else
{
echo "<title>".(defined('e_PAGETITLE') ? e_PAGETITLE.' - ' : (defined('PAGE_NAME') ? PAGE_NAME.' - ' : "")).SITENAME."</title>\n\n";
}
//
@@ -816,4 +824,4 @@ if ($e107_popup != 1) {
unset($text);
}
//Trim whitepsaces after end of the script
//Trim whitepsaces after end of the script