On fresh install of Joomla 3.6.0 create category "News", then create "Sport" subcategory within it and add an article to "Sport" subcategory. Create menu item of "List all categories" type pointed to "News" category. Then at frontend navigate to "Sport" subcategory through menu.
Page title (title html tag) should be "Sport".
Page title is "News" - same as menu title.
Joomla 3.6.0
Correct, description was updated.
This is expected behavior, even if not friendly. The subcategory is still using the parent category's menu item and as such it has pulled in and uses that configuration (same goes for category -> article relationships, the <h1>
title on https://www.joomla.org/announcements/release-news/5664-joomla-3-6-is-here.html comes from the menu item which is a category view).
if expected behavior
IMHO is not good behaviour, because if you then enter in the article inside the subcategory the title is the title of the article, not of the menu item. So it seems not logic to me.
so let's see it, how it currently works:
So, IMHO it should work like this:
Agree but we've created a system where the menu item seems to win on all settings so good luck changing that paradigm. Not to mention there's this really messy crap with JViewCategory.
We could check menu query variables to decide
if active menu item is a direct match of current view
(i am using something like the following in all my custom views)
$menu_is_view_direct_match = ... check active menu item query variables
if ($menu_is_view_direct_match)
{
// Use menu title for page title
}
else
{
// Calculate custom page title e.g. use sub-category title
}
It's still a behavior change that has to be introduced very carefully. People notice SEO stuff long before anything else, and changing page titles changes SEO stuff
@mbabker
yes
but if done well it will be better SEO, and people will not complain,
instead will be happier / like it,
there is a little risk to it not being done right on 1st try, since amount of code is rather small too
and testable (visit all possible combinations of Active Menu item - view)
maybe good for J3.7 ?
(Just personally i don't have time for new PRs now, if this gets label J3.7.0 i could do later, or some else would want to do it, i already want to contribute some nice JS related PRs like AJAX submit for all forms, and i don't know when i will have time again for them)
@mbabker
I've created this issue because of SEO :) With current behaviour I get multiple "Duplicate title tags" warnings in Google Webmasters Tools.
Just goes to prove my point
Still something you have to be careful about changing though because it has the chance to affect existing sites, even if it's an improvement over the current behavior. Since the dev strategy generally promises to not make major changes to page structures (and I'd say metadata would be covered by that), it's a change that has to be pointed out very explicitly in a release announcement.
Hi
I am going to have to close this as expected behaviour. As Michael said thats the way that joomla operates and it just couldnt be changed without effecting existing web sites. There may be seo extensions available at the Joomla Extensions Directory that will handle this for you but its not a change that can be made in the core.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-09-07 08:07:45 |
Closed_By | ⇒ | brianteeman |
confirmed, but i think it also worked like that in 3.5.x
And actually you get the menu title, not the category title