Pixel & Tonic

FieldFrame

version works on rated
1.4 EE1
Download Get Help

Custom Tag Functions

FieldFrame 1.0.8 added Custom Tag Functions. By default, template tags will call the fieldtypes’ display_tag() function. But you may want to offer alternative ways of presenting the field’s data. So now, you can write multiple versions of the display_tag() function (with different names), which can be accessed from the template by appending a colon (:) and the new function’s name to the template tag:

<!-- ... -->

{if my_ff_matrix_field:total_rows < 10}
  There are less than 10 rows.
{if:else}
  There are {my_ff_matrix_field:total_rows} rows
{/if}

<!-- ... -->

Your custom tag functions will receive the same arguments as display_tag().