Posted by tomsm on May 14, 2009 at 12:18pm
Jump to:
| Project: | Similar By Terms |
| Version: | 6.x-1.9 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
#1
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);
#2
@ schnippy
works great. Thanks!
#3