User tests: Successful: Unsuccessful:
Pull Request for Issue #11792.
In language module, Add a "lang-associated" class to languages that have a content associated to current content.
Note that this PR just provide the class, but does not use it in css (as it's already the case with the "lang-active" class).
Combined with a specific css (up to the template) this can help the visitor guess that changing language will take it to some other content (the parent menu or the homepage)
An example after using opacity in css to mark the difference with protostar (EN is active, FR is associated but not IT):
In a multilinguale site, add a category with associations in different languages (but not all), an article and associations in different languages (but not all).
optionally add this custom css to your template:
.lang-inline a {
opacity: .5;
}
.lang-inline .lang-active a, .lang-inline .lang-associated a {
opacity: 1;
}
Add the language switcher module to your site (using flags).
Go to category / article with association. Verify language module entries corresponding to associated languages have the "lang-associated" class
change language switcher module settings to display languages
Go to category / article with association and verify again
Change template to beez
Go to category / article with association and verify again
You can use this dataset :
joomla-ml-sample-sql.zip
it provides a en/fr/it site where main page is fully associated, while a category named glossary is only associated with french. Articles inside glossary are either associated with french (joomla / cms) or with none (free and opensource)
login: test@example.com / test
I don't think (but I'm quite new to joomla)
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Modules |
Labels |
Added:
?
|
Category | Front End Modules | ⇒ | Front End Modules Templates (site) |
i guess you could add here a screenshot of the result for each situation plus the new class to add in the template css to check what you want to reach. then will test.
ok will do.
This should be ready for testing.
I have tested this item
Looks fine to me, but why did you remove it for the menu item associations?
I remove the menu item association because the scope is to know that an item is translated (changing language won't send me elsewhere, but on a corresponding item in my language).
When you switch language, menu item association enable landing less far away that going back to home, but this does not tells you that current item is translated. Menu association will be evaluated even if you are reading a non translated article after navigating to it inside a menu, so that's the wrong information.
I was just thinking that it could still be a useful information to differentiate it from a link that just gives you the homepage.
What do you think about using two different classes, one for an associated item and one for an associated menu? Looking at your code you could just assign a string (eg lang-associated-item
and lang-associated-menu
) instead of true
to the $language->associated
property and then directly use that as class.
Hi, I would like to rework on this, trying to do this better.
Anyone could tell me the right way to verify if I'm currently displaying the page corresponding to the active menu or a page under it. (eg. If the menu displays list of article, knows if I'm currently displaying this or an article inside the list).
@alexgarel should this PR be tested or are you on rework?
Hi @franz-wohlkoenig, It would have been to be reworked. Nobody respond to my question above though. Also I'm not a regular php programmer. So atm I can't find time to continue on this.
@alexgarel so please close this PR in the Time you reworke it. Please reopen this PR or open an new one after you have finished.
ok, I close it.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-05-28 15:35:32 |
Closed_By | ⇒ | alexgarel |
@infograf768 @brianteeman I think this PR is low-cost and is complementary to #11935.
So I think its still worth.
Would you mind looking at it ?
I put a sql file for quick testing (I didn't find any true multilingual base sample).