When custom fields are rendered in the frontend (in an article page for instance), the fields are not grouped by the field groups they are member of.
Grouping works perfectly in the admin console where, when a field is part of a group, it is shown in its own group tab.
To properly group fields in the frontend, as intended by the designer of the website.
Change the code for components/com_fields/layouts/fields/render.php to support the field groups
There will be no change for fields that are not grouped.
However, field groups will be skinnable and custom fields that are part of those groups will be properly organized.
The output now:
<ul class="fields-container">
<li class="field-entry"> … </li>
<li class="field-entry"> … </li>
</ul>
The new output:
<ul class="fields-container">
<li class="field-entry"> … </li>
<li class="field-entry"> … </li>
<li class="field-group group_[group id]">
<span id="group_[group id]">[group name]</span>
<ul role="list" aria-labelledby="group_[group id]">
<li class="field-entry"> … </li>
<li class="field-entry"> … </li>
<li class="field-entry"> … </li>
</ul>
</li>
</ul>
Following this proposal, I will propose a PR.
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-02-08 21:58:29 |
Closed_By | ⇒ | richard67 |
Thanks Richard, I did not know that.
We close issues when we have a PR for it. As you are the author of the PR and the issue you could have closed this issue yourself.