Truncate description text display in item-sets

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.

That should work the same there as it does for items.

You could be seeing cached content maybe? Some servers will also cache the PHP files in a way where editing a file means needing to clear the cache or restart the PHP server.

A quick-and-dirty way to check if your code is running at all is to use die('foo');, which will just stop the process immediately and print “foo”; if the page looks normal with that in your view, you’d know that code isn’t being reached or used.

So, the issue is actually within the faceted browse. Is there a way to limit length of the items and item-sets texts within the faceted browse view?