Hi does anyone know if it is possible to have the truncated description code from the AUG "Only Displaying the First Ten Words of the Full Description " to be applied in the Search and filter results?
Or if there is a better way to achieve this.
Or if there is a better way to achieve this.
Code:
<actinic:block php="true" >
$sShort = "";
$nCount = 0;
$sOriginal = '<actinic:variable encoding="perl" name="ProductDescription"
selectable="false" />';
foreach(explode(" ", $sOriginal) as $sWord)
{
if ($nCount > 10)
{
$sShort .= "...";
break;
}
$sShort .= $sWord . " ";
Advanced Users Guide - 58
$nCount++;
}
echo $sShort;
</actinic:block>
Comment