Hi, I used this code snippet successfully to limit the description text to 200 characters on ITEMS, as indicated here: Limit length of description text of items in "browse" view
However, when I use the same snippet to limit text in ITEM-SETS, nothing happens.
I go here: themes/centerrow/view/omeka/site/item-set
and put the snippet (with bold) inside the browse.phtml like this:
foreach ($itemSets as $itemSet):
$heading = $headingTerm ? $itemSet->value($headingTerm, [‘default’ => $translate(‘[Untitled]’), ‘lang’ => $valueLang]) : $itemSet->displayTitle(null, $valueLang);
$body = $bodyTerm ? $itemSet->value($bodyTerm, [‘lang’ => $valueLang]) : $itemSet->displayDescription(null, $valueLang);
$maxLength = 200;
$body = mb_substr((string) $body, 0, $maxLength, ‘UTF-8’) . ‘…’;
$linkContent = sprintf(‘%s%s’,
$thumbnail($itemSet, ‘medium’),
$escape($heading));
?>
Any help would be appreciated.