Welcome, Guest
Username: Password: Remember me
Got a Joomla problem? Post as much detail about it as you can here to see if you can get a solution.

Help others in the community - post your Joomla tips and how-tos here.

TOPIC: Custom Fields - Using the Render Class on a manually inserted field

Custom Fields - Using the Render Class on a manually inserted field 1 month 3 weeks ago #8445

  • Terry
  • Terry's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 5
Hi,

I have been playing with Custom Fields today on a J 3.8 system and have found either a bug or a design feature, just not sure which one yet. B)

In a custom field you can specify Render Class(es) that are supposed to allow you to alter the display of a custom field when it appears in your article. For me it works when the field display is Automatic but if it is a manual render, i.e. just {field 1} inserted in the article, the Render Class does not appear.

For example if I specify a class FredBarney in the Render Class for field 1, part of fieldgroup 1, and then insert {field 1) and {fieldgroup 1} into my article and then display the article and inspect the source code, I would expect to see 'class=fredBarney' before the display of field 1.

However 'class=fredBarney' only appears for Field 1 if it is set to Automatic Display or is part of Fieldgroup 1, whereas for the manual render of Field 1 it does not appear.

What makes me think this could be a design feature is github.com/joomla/joomla-cms/issues/14753 and the resulting PR mentioned in the post. Which kind of makes sense to give people more control over a manual render but maybe they could make i a bit clearer it is going to happen.

Has anyone else found this an issue?

or if you are playing with CF's just be aware of this behaviour.

Terry
Been working with Joomla for Fun and Work for 10 years.
Last Edit: 1 month 3 weeks ago by Terry.
The administrator has disabled public write access.
Time to create page: 0.037 seconds
Powered by Kunena Forum