{save_profile}
Tag {save_profile} allows developers to save defined profile data. Since version 4.4.3.
Parameters
- name - variable name where the saved data row ID is saved, this is 0 if there was errors when saving.
- profile - the name of the profile which defines the data or
- profile_id - the ID of the profile which defines the data.
- id - the ID of the table row where the data is saved, if missing a new row will be created.
- fields - array of field name and value pairs to be saved. Only active fields of the profile will be saved.
- fieldname1
- fieldname2
- etc - extra fields and values to save, which are not defined in the profile
- on_create - allows to publish all objects immediately. If the parameter has value "on_create=publish", then a created object is published immediately. Default value is "hide". 4.4.6
- parent - the object's (section, article, asset etc) ID number where to save the new object. If parent is not defined, then current page ID is used. Used only if the profile is CMS object. 4.4.6
For a comprehensive example see the registration template in "saurus4" example
{init_profile}
Tag {init_profile} allows developers to load a defined profile data. Since version 4.4.3.
Parameters
- name - variable name where the returned data is saved. Default value is "profile".
- profile - the name of the profile which defines the data or
- profile_id - the ID of the profile which defines the data.
- id - the ID of the table row from where the data is read.
- readonly_fields - fields for which only the value is returned.
Attributes
- id - the ID of the profile used.
- table - the table name from where data is read.
- name - the name of the profile used.
- title - the translation of the profile used.
- all - array of profile data.
- results - array of profile fields:
- value - the field value.
- type - type of the field.
- is_required - this value is 1 if the field is marked as required.
- name - name of the profile field
- title - translation of the profile field name.
- html - profile fields HTML code, if the field was in the readonly_fields list, then this is only the value of the field
For a comprehensive example see the registration template in "saurus4" example
