In DPfields the predecessor of com_fields its possible to add custom fields to categories.
can we implement this also in com_fields?
since a lot of us already use DPfields it wil also contribute to a seamless transition wen upgrading from 3.6.x with DPfields to 3.7 with com_fields
Labels |
Added:
?
|
Category | ⇒ | com_fields Feature Request |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-03 18:33:19 |
Closed_By | ⇒ | jeckodevelopment |
Can somebody update me on where it was left with custom fields in categories in 3.7? If it is implemented how is it added and how do you pull the values into an override?
Can somebody update me on where it was left with custom fields in categories in 3.7?
It is implemented just check it out in the last rc version: https://github.com/joomla/joomla-cms/releases/tag/3.7.0-rc1
If it is implemented how is it added and how do you pull the values into an override?
see #13837 for implemention details ;)
Is there any documentation on how to pull field values within an override? I need to be able to pull individual fields into several areas of the article override.
On Apr 10, 2017, at 2:27 PM, zero-24 notifications@github.com wrote:
Can somebody update me on where it was left with custom fields in categories in 3.7?
It is implemented just check it out in the last rc version: https://github.com/joomla/joomla-cms/releases/tag/3.7.0-rc1
If it is implemented how is it added and how do you pull the values into an override?
see #13837 for implemention details ;)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
It all depends on which override?
Is there any documentation on how to pull field values within an override? I need to be able to pull individual fields into several areas of the article override.
Documentation is still work in progress
To use them in you overrides, just have a look at the $item->jcfields property. It contains an array of a fields for the given item. Eg:
Array
(
[4] => stdClass Object
(
[id] => 4
[title] => article-editor
[name] => article-editor
[checked_out] => 0
[checked_out_time] => 0000-00-00 00:00:00
[note] =>
[state] => 1
[access] => 1
[created_time] => 2017-04-07 12:08:59
[created_user_id] => 856
[ordering] => 0
[language] => *
[fieldparams] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[buttons] =>
[width] =>
[height] =>
[filter] =>
)
[initialized:protected] => 1
[separator] => .
)
[params] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[hint] =>
[render_class] =>
[class] =>
[showlabel] => 1
[disabled] => 0
[readonly] => 0
[show_on] =>
[display] => 2
)
[initialized:protected] => 1
[separator] => .
)
[type] => editor
[default_value] =>
[context] => com_content.article
[group_id] => 0
[label] => article-editor
[description] =>
[required] => 0
[language_title] =>
[language_image] =>
[editor] =>
[access_level] => Public
[author_name] => Super User
[group_title] =>
[group_access] =>
[group_state] =>
[value] => Bar
[rawvalue] => Bar
)
)
That should give you all the needed data.
To render the field you can use FieldsHelper::render()
, just pass it the needed data (see existing uses).
+1 - from template developer view, this would be great feature.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13107.