Skip to content

New Feature. Backend option "Include Site Name in Page Titles"#8596

Closed
ghost wants to merge 7 commits intostagingfrom
unknown repository
Closed

New Feature. Backend option "Include Site Name in Page Titles"#8596
ghost wants to merge 7 commits intostagingfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Dec 5, 2015

When many tabs are opened in backend it's hard to identify them by titles because always sitename is displayed at first.

pagetitle_before

This patch adds a new option Include Site Name in Page Titles in Global Configurations > Site to control the behavior how / where the sitename is set: Before | After | No

Test:

  • Apply patch
  • Backend Go to System > Global Configuration > Site
  • On the right side below Cookie Settings you'll find a new option Include Site Name in Page Titles
  • Test settings and compare titles in browser tabs and browser title

Example for After
pagetitle_after

BC
Before is default setting, also in PHP Code.

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-staging labels Dec 5, 2015
@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 5, 2015

I don't understand Travis message (PHP 7)

The command "if [ "$INSTALL_APCU_BETA" == "yes" ]; then printf "
" | pecl install apcu-beta; fi" failed and exited with 127 during .

@infograf768
Copy link
Copy Markdown
Member

This works. Not sure it is useful when working on different sites though as the site title would be cut off in many cases here (Firefox Macintosh).

@brianteeman
Copy link
Copy Markdown
Contributor

I'm with @infograf768 on this - as soon as you have multiple tabs open in any browser its not possible to tell which site the tab refers to which is more important than which page.

@Fedik
Copy link
Copy Markdown
Member

Fedik commented Dec 5, 2015

a loot depend how big monitor/window size, and how many tabs user keeps open ...
if usually you keep 100 tabs open, then of course sugested changes make no any help for you, but if you keep up to 10-20 (depend from monitor/window), then it could be helpfull

upd. also it can be different for different OS

@brianteeman
Copy link
Copy Markdown
Contributor

@Fedik While Safari will display as much of the title as is possible on the screen Both FF and Chrome always display a fixed maximum number of characters no matter how big the screen or number of tabs

@Fedik
Copy link
Copy Markdown
Member

Fedik commented Dec 5, 2015

you are correct, this part I have missed.
but I still like the idea to see the "View" in the tab title:
before:
screen 2015-12-05 15 24 36 754x52
after
screen 2015-12-05 15 27 22 754x52

Admit, with it, it is more easy to find out what/where is opened?

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 5, 2015

This PR provides the possibility to choose which behavior you prefer! The default setting is Before.

config-include

Most people work with 1 site at a time.

@andrepereiradasilva
Copy link
Copy Markdown
Contributor

@bertmert don't know if it's related to this PR somehow. But what do you think that in homepages (all languages) having only the sitename as page title?

So instead of having "Home Menu Item Title - Sitename" only "Sitename".

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 5, 2015

@andrepereiradasilva
This PR is for backend only.

If you want to show only sitename in frontend on Home(s) simply use a combination of
this
https://docs.joomla.org/How_to_determine_if_the_user_is_viewing_the_front_page
and

$this->setTitle(JFactory::getApplication()->get('sitename'));

in your template index.php or somewhere in an override.

In frontend the TITLE is generated in many different views (view.html.php) and before I start changing a dozen of files knowing that a PR like this never will be accepted here... ...

@andrepereiradasilva
Copy link
Copy Markdown
Contributor

ok thanks

@Fedik
Copy link
Copy Markdown
Member

Fedik commented Dec 7, 2015

I have tested this item ✅ successfully on e1af233


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8596.

@brianteeman
Copy link
Copy Markdown
Contributor

I have tested this item 🔴 unsuccessfully on e1af233

Does what it says for Isis
no field present in global configuration for Hathor


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8596.

@joomla-cms-bot
Copy link
Copy Markdown

This PR has received new commits.

CC: @brianteeman, @Fedik


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8596.

@joomla-cms-bot
Copy link
Copy Markdown

This PR has received new commits.

CC: @brianteeman, @Fedik


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8596.

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 9, 2015

Does what it says for Isis
no field present in global configuration for Hathor

Thanks! Added Hathor support.

@infograf768
Copy link
Copy Markdown
Member

Works now both in Hathor and Isis.
Lets maintainers decide about merging or not.

@andrepereiradasilva
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on c391124

But, what do you think of making this change:
"Page title - Menu/submenu Title - SITENAME (Administration)" instead of "Page Title - Menu/submenu Title - SITENAME - Administration"
And
"SITENAME (Administration) - Menu/submenu Title - Page Title" instead of "SITENAME - Administration - Menu/submenu Title - Page Title"

Or in other words "SITENAME (Administration)" instead of "SITENAME - Administration" since "-" is the path separator


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8596.

@brianteeman
Copy link
Copy Markdown
Contributor

Setting to Needs Review to see if the maintainers want to add this feature in light of comments above


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8596.

@joris85
Copy link
Copy Markdown

joris85 commented Apr 15, 2016

I never experience this issue.
And i work allot of time on different site's in allot of tabs so i like the sitename in the beginning.
But if it is a parameter i see no problem to add this :-)


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8596.

@Simonkloostra
Copy link
Copy Markdown

I have tested this item ✅ successfully on c391124

I have tested this item succesfully, thoug frankly I would not be in favour of actually adding it, as I think Global Configuration settings should only show really important ones, it might things unnecessarily complicated for inexperienced users. Also, I hardly ever suffer from this issue, even with multiple tabs open.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8596.

@wilsonge wilsonge closed this in 276ac6c May 7, 2016
@wilsonge
Copy link
Copy Markdown
Contributor

wilsonge commented May 7, 2016

I've taken an executive decision here. this is not something that needs a parameter - so I've just committed the new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants