e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
323 stars 214 forks source link

Define Page Name #4133

Open LaocheXe opened 4 years ago

LaocheXe commented 4 years ago

I created the Awards plugin, and had to add define('PAGE_NAME', LAN_PLUGIN_NAME); In the web browsers it shows the Page Name - Site Name.

My question is, can I flip them around? so Site Name - Page Name??

P.S. Forum default page has no Page Name.

tgtje commented 4 years ago

I am being carefull now..( not that sure): having said that: i believe no. PAGE_NAME is a base name aka A displays B, it will likely not be accepted.

maybe e_PAGETITLE could be used instead > it will be a testcase.. see gallery php line 35 as example

ps LAN_PLUGIN_NAME itself as a define does not exist. more being LAN_PLUGIN_AWARD_NAME or such which you have to create yourself (eg like in plugin xml, or global lang file etc..)

Jimmi08 commented 4 years ago

Hm, this is hardcoded in header template:

echo e107::getSingleton('eResponse')->renderMeta()."\n";  // render all the e107::meta() entries.

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";
}

With the metatag plugin, you can fix only the meta tag with the name title, not title itself.

Moc commented 4 years ago

yeah I have been wondering about this as well. I think we should make this customizable. Labeled as enhancement.

Jimmi08 commented 4 years ago

yeah I have been wondering about this as well. I think we should make this customizable. Labeled as enhancement.

It would be nice if it checks if the meta tag title is set and then use its value.