UserField

UserField Snippet for Evolution CMS

by | 2.0 |

Displays EVO 3.1x user fields, user TVs, and user MultiTVs based on the parameter `fieldType`based on UserInfo https://github.com/extras-evolution/UserInfo, with added support for Evo 3.1x Users Tvs and user MultiTVs

Snippet parameters

  • &id: user ID (leave empty for the current logged user)
  • &field: name of the field
  • &fieldType: type of user field. Values: field/tv/multitv. Default: field

Parameters only for &fieldType=`multitv`

(Mimics some parameters of the MultiTv snippet )

  • &outerTpl: outer template chunk for the snippet output (or html code using @CODE:)
  • &rowTpl: row template chunk for the snippet output (or html code using @CODE:)
  • &toPlaceholder: the snippet output is assigned to a placeholder named as the parameter value
  • &display: number of rows to display
  • &orderBy: order type and order direction to sort the output 
  • &noResults: the No data available message

Examples

Display a user field 

[[UserField? &field=`fullname` &id=`123`]]

Display current logged user field 

[[UserField? &field=`fullname`]]

Display a user Tv field

[[UserField? &fieldType=`tv` &field=`PrivacyAgree` &id=`123`]]

Display a user MultiTv field

NOTE: The snippet does not access multitv config files; so you need to define the rowtpl and outertpl parameters

[[UserField? &fieldType=`multitv` &field=`event` &id=`123` &rowTpl=`rowchunkname` &outerTpl=`outerchunkname` &toPlaceholder=`1`]]

go to top