?
avatar allrude
allrude
6 Dec 2016

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

Votes

# of Users Experiencing Issue
0/1
Average Importance Score
5.00

avatar allrude allrude - open - 6 Dec 2016
avatar joomla-cms-bot joomla-cms-bot - change - 6 Dec 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Dec 2016
avatar brianteeman brianteeman - change - 7 Dec 2016
Category com_fields Feature Request
avatar n3t
n3t - comment - 13 Dec 2016

+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.

avatar laoneo
laoneo - comment - 1 Feb 2017

Please test PR #13837. It adds support for categories on articles and contacts. Feedback is appreciated. Guess this issue can be closed then.

avatar jeckodevelopment jeckodevelopment - change - 3 Feb 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-02-03 18:33:19
Closed_By jeckodevelopment
avatar jeckodevelopment jeckodevelopment - close - 3 Feb 2017
avatar learncss
learncss - comment - 10 Apr 2017

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?

avatar zero-24
zero-24 - comment - 10 Apr 2017

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 ;)

avatar learncss
learncss - comment - 11 Apr 2017

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.

avatar laoneo
laoneo - comment - 11 Apr 2017

It all depends on which override?

avatar Bakual
Bakual - comment - 11 Apr 2017

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).

Add a Comment

Login with GitHub to post a comment