1. Create an override i.e. "portrait.php" for custom fields:
i.e. copy render.php from components/com_fields/layouts/field/ to
templates/your_template/html/layouts/com_fields/field/portrait.php
add some test text in the output.
2. Create a custom field for users (I tried with text and media)
on tab "Options" choose "Show label" hide and choose "Layout" the value "portrait" from your template
3. Add a value to the new field in your user profile
4. Create frontend menu item for user profile
Login to frontend, show user profile
Only field value should be shown and your test output from the file
Label is shown, layout override from template is not loaded.
Joomla 3.9.1
Connected to #23138
I think com_users was not implemented.
Probably it is two issues - one for the label, one for the layout override.
If necessary, I will created a second one, please let me know.
Labels |
Added:
?
|
Yes, I think so too, but the render options for the custom user fields are not working in frontend, like "Hide Label", label-classes and Layout.
Status | New | ⇒ | Discussion |
Status | Discussion | ⇒ | Information Required |
Category | ⇒ | com_fields |
Labels |
Added:
J3 Issue
|
It turns out that com_users has a completely different way of displaying custom fields.
Instead of using a fields/render.php
layout (like com_content and com_contact do), com_users in the user profile outputs the fields through:
components/com_users/views/profile/tmpl/default_custom.php
Also, when outputting the user fields in their respective com_contact page, they're output with yet again another different way of doing it. They're output through:
components/com_contact/views/contact/tmpl/default_user_custom_fields.php
Neither of these two methods of outputting user custom fields is honoring layouts in any way.
So the user custom fields behavior is not at all consistent with the other two components (com_content and com_contact).
This can of course still be overridden via template, but the ideal situation would be implementing the rendering of the user fields to be the same as the rest by using the com_fields/layout/fields/render.php
Status | Information Required | ⇒ | Confirmed |
I guess nobody cares about this issue?
I do. And I haven't checked how this is handled in J4.
Thank you for raising this issue.
Joomla 3 is now in security only mode with no further bug fixes or new features.
I have verified that at least the show label part is still an issue with Joomla 4
Please can the label be updated to J4 Issue
Labels |
Added:
No Code Attached Yet
J4 Issue
Removed: J3 Issue ? |
Labels |
Added:
bug
|
I think - originated from this pull request #18571