? Pending

User tests: Successful: Unsuccessful:

avatar mattiaverga
mattiaverga
19 Oct 2017

Pull Request for Issue # .

Summary of Changes

This PR adds two new layout overrides to com_content for rendering fieldgroups.
The list layout produces an unordered list (<ul><li></li></ul>) which surrounds the default field layout for the single element.
The table layout produces a table view of the fieldgroup with a <caption> element which uses the fieldgroup title. Labels are rendered as <th scope="row"> (if set to display label), while values are normal <td> entries.

Testing Instructions

Create a fieldgroup with one or more fields. Display the fieldgroup in an article body. Use {fieldgroup x} for the default com_fields layout and {fieldgroup x,list} or {fieldgroup x,table} for, respectively, list layout override or table layout override.

Expected result

Add more nicer ways to render fieldgroups inside articles.

Actual result

Only the default com_fields layout is available.

Documentation Changes Required

The layout override option is only mentioned inside the Content - Fields plugin settings. It would be nice an addition to Joomla documentation.

avatar joomla-cms-bot joomla-cms-bot - change - 19 Oct 2017
Category Front End com_content
avatar mattiaverga mattiaverga - open - 19 Oct 2017
avatar mattiaverga mattiaverga - change - 19 Oct 2017
Status New Pending
avatar ladyjer ladyjer - test_item - 21 Nov 2017 - Tested successfully
avatar ladyjer
ladyjer - comment - 21 Nov 2017

I have tested this item successfully on 36fdfca


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18367.

avatar Bakual
Bakual - comment - 25 Nov 2017

Do we really need to add those layouts to core? Imho, this are things which can be done by the user in a template override.

avatar mattiaverga mattiaverga - change - 26 Nov 2017
Labels Added: ?
avatar mattiaverga
mattiaverga - comment - 26 Nov 2017

@Bakual How? I can't find any way to override com_content layout in template. Only Views.

avatar Bakual
Bakual - comment - 26 Nov 2017

It is not a com_content layout. It is a com_fields layout.

See also #18571 where you can see the paths

avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Nov 2017
Status Pending Information Required
avatar mattiaverga
mattiaverga - comment - 26 Nov 2017

Oh, I tried in many ways, but I didn't try to put a "layouts" directory under the "html" directory... I think the documentation is not clear on that.

Anyway, thank you, now I agree that this can be done at user template level, so I retire this PR.

avatar mattiaverga mattiaverga - change - 26 Nov 2017
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2017-11-26 08:52:59
Closed_By mattiaverga
avatar mattiaverga mattiaverga - close - 26 Nov 2017

Add a Comment

Login with GitHub to post a comment