Multilanguage (but not only): Adding field menuitem to login menu item#10249
Multilanguage (but not only): Adding field menuitem to login menu item#10249roland-d merged 5 commits intojoomla:stagingfrom
Conversation
|
@andrepereiradasilva @brianteeman @richard67 @Bakual @mannybiker Thanks for testing. |
|
I have tested this item ✅ successfully on 6fa9124 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
Is it possible to make the default be the new menu item option and the custom url only displayed on load if it is set This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
@brianteeman |
|
This PR has received new commits. CC: @brianteeman This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
But can it be set so that IF custom url not blank then it is displayed. On 5 May 2016 at 09:21, infograf768 notifications@github.com wrote:
Brian Teeman |
|
let me see |
|
nope, can'f find how to. |
|
Item tested and working. Very useful addition since it was very time consuming and reason for mistakes to find all the correct article id, catid, itemid to compose manually the URL. I agree with brianteeman on the default behaviour of having the menu item as default option if the custom URL filed is empty, but I understand that if this is technically difficult to achieve it is probably best to keep the Custom URL as the first option so that it is clear that either there is no configured URL or the old data is still there. |
|
This PR has received new commits. CC: @brianteeman This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
Found the solution. Easier in the morning 😄 @mannybiker Thanks for testing |
|
Awesome - knew you wouldnt give up until you worked out how to do it On 6 May 2016 at 07:53, infograf768 notifications@github.com wrote:
Brian Teeman |
|
Can you folks set this RTC in issues (after testing 😃 ) |
|
Dont worry - I'm on a train to the sprint right now but will make sure it On 6 May 2016 at 08:07, infograf768 notifications@github.com wrote:
Brian Teeman |
| COM_USERS_FIELD_CATEGORY_ID_LABEL="Category" | ||
| COM_USERS_FIELD_ID_LABEL="ID" | ||
| COM_USERS_FIELD_LOGIN_MENUITEM="Menu Item" | ||
| COM_USERS_FIELD_LOGIN_REDIRECT_CHOICE_DESC="'Custom URL' lets enter any internal url in the Redirect field while 'Menu Item' let's directly select an existing menu item.<br />For a multilingual site, it is advised to choose 'Menu Item'." |
There was a problem hiding this comment.
Can you change this string to the following as it is better English
+COM_USERS_FIELD_LOGIN_REDIRECT_CHOICE_DESC="'Custom URL' lets you manually enter any internal url in the Redirect field. 'Menu Item' lets you directly select an existing menu item.
For a multilingual site, it is advised to use 'Menu Item'."
|
Made a small suggestion for one of the language strings This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
This PR has received new commits. CC: @brianteeman This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
Done. Thanks Brian. |
|
Thanks
|
item in case some 3rd party component uses similar field names
|
This PR has received new commits. CC: @brianteeman This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
Ok i see we have to add internal URI ( |
|
I have tested this item ✅ successfully on 5265043 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
@andrepereiradasilva |
i know, just pointing out that. Tests in en-GB ok. Still have to test in a multilanguage env. |
|
@andrepereiradasilva |
|
i would add the new tooltip indicating that AND add placeholders (in all login/logout forms). But in another PR. |
|
OK, let's do that in another PR and get this one in first. |
|
I have tested this item ✅ successfully on 5265043 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
Rtc This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10249. |
|
Merged, thanks everybody for participating. |
|
thanks @roland-d |
… or login/logout menu items (#9724) * [imp] Multilanguage: allowing any login redirection * correcting menulogout to cope with logout set to Default * better * Implementing associations redirect from login module redirection * cs * Correcting when site is not multilingual * Taking off the part for menu logout as it is already in #10249
|
Strings modified here: #10336 |

For a reason that I ignore (history I guess), the Login menu item contains a Redirect field in text format.
For multilanguage (as well as monolanguage), it is better to have a "menuitem" type field, which will prevent any error as the redirect should be internal. In that case it is an Itemid which is saved in the database (as already exists for the Logout menu item).
The issue here was to remain B/C while letting people use the alternative "menuitem" field.
To accomplish this, I added a new field of type "menuitem" (for the login and logout parts of the Login menu item), created 2 new rules, and added showon to let display only one field at a time and throw an alert preventing saving a value both in the ancient "Login Redirect" and the new "Menu Item Login Redirect" and as well for "Logout Redirect" and the new "Menu Item Logout Redirect".
When the menuitem field is used, the patch also checks if Multilang is on and, if it is, adds the necessary lang tag to the redirect.
Once this is merge, we will be able to merge a pending PR #9724 allowing multilanguage users to choose any redirection in the login module too, including associations when automatic change is on.
New interface (it is B/C as default is "Login Redirect" text field)
If choosing "Menu Item"
To test, enter internal values in the "Login redirect" and "Logout redirect" fields, save.
Then patch and test in monolanguage and multilanguage.
For example, if both fields are used for login (or/and logout), validation will prevent saving the menu item and we will get a Warning.
or