I would like to set the maximum length of the displayed titles in the similar block so that each title fits on one line. If the title does not fit, 3 points are added, for example: Title 1 ...
Now I have:
> Title 1 etcetc etc
etc etc.
> Title 2 etc etc
> Title 3

And I would like to show them like this:

> Title etcetc ...
> Title 2 etc etc
> Title 3

I think that this will look better.

Comments

schnippy’s picture

I had the same issue with this but resolved it in the template file. I copied the similiarterms.tpl.php file from the module directory into my theme directory and added this to my template file:

    foreach ($items as $node) {
      if (strlen($node->title) > 70) {
              $node->title = mb_substr($node->title, 0, 70)." ...";
      }
      $items_ls[] = l($node->title, 'node/'. $node->nid);
tomsm’s picture

@ schnippy

works great. Thanks!

rmiddle’s picture

Status: Active » Closed (fixed)