Hello All,
thank Bucklash for all your help on the forum.
You're right, there is two way to get values, depending on where you are.
In all plugin CCK field code (BeforeRender, BeforeStore, Afterstore,..) you have access only to 2 variables :
- $fields => the array of all fields in the view
- $config => the array of all configuration of the context
in general for all views, in the $config variable, you can find :
- $config['pk'] => The ID in the article (#__content table)
- $config['isNew'] => 1 for Add / 0 for Edit
- ....
For "Storage Event", you have also access to the variable :
in this variable, all datas configured will be stored or have been stored.
In template, you have access to the object "$cck" and can get properties of a field by the syntax :
- $cck->getProperty('field_name');
where Property must be replaced by the
Propery expected, like : Value, Link, Html, Thumbx, Text, ......
Now, when you want to debug, you also have the solution with the extension
JDump, which is very easy to use.
You can add the tag "dump( $my_object, 'My Object' );" everywhere in your code and you will see Properties and Methods available on your object
Regards.
Lionel