1779 Posts in 582 Topics by 556 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 301 Views |
-
Limit Characters Displayed in ComplexTableField

31 January 2012 at 1:01pm
Hi, I'd like to limit the number of characters that are displayed in a ComplexTableField (in CMS) while keeping the underlying data in tact for display in the popup. Any thoughts?
-
Re: Limit Characters Displayed in ComplexTableField

1 February 2012 at 6:23am Last edited: 1 February 2012 6:24am
One simple way to do is to create a function in your DataObject that returns the truncated text, then add the name of that function to the summary fields, like
static $summary_fields = array(
'Name',
'Title',
'TruncatedCondent'
);function TruncatedContent() {
// return $this->Content, truncated in some way
}
| 301 Views | ||
|
Page:
1
|
Go to Top |

