ke Technical Documentation

Tuesday, October 9, 2012 Truncate Long Text

This is a function to truncate long text in a smart way.

Function format:

|KE_GENERIC_SMART_TRUNCATE(fieldname,size,last_text,more_text)|

where:

  • fieldname is the field name available in the specific snippet or a input field available in request
  • size - max size
  • last_text - last string to look for
  • more_text - text to be added after truncation

Example:

|KE_GENERIC_SMART_TRUNCATE(DIRECTORY_ITEM_DESCRIPTION,30, ,..)|

This example will truncate the item description to 30 characters.

back

Add a comment






Comments


NqvRXoTmlnRB