No Code Attached Yet
avatar obuisard
obuisard
8 Feb 2022

What needs to be fixed

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.

Why this should be fixed

To properly group fields in the frontend, as intended by the designer of the website.

How would you fix it

Change the code for components/com_fields/layouts/fields/render.php to support the field groups

Side Effects expected

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.

avatar obuisard obuisard - open - 8 Feb 2022
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Feb 2022
avatar richard67 richard67 - change - 8 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-08 21:58:29
Closed_By richard67
avatar richard67 richard67 - close - 8 Feb 2022
avatar richard67
richard67 - comment - 8 Feb 2022

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.

avatar obuisard
obuisard - comment - 8 Feb 2022

Thanks Richard, I did not know that.

avatar richard67
richard67 - comment - 8 Feb 2022

Was this a duplicate to #36967 ?

Add a Comment

Login with GitHub to post a comment