Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hi,
i created a front page with panels module. also used extra layouts for 4 columns.
i want to trim teaser title and also it should be linked to node.
there is "Link the node title to the node" option but can not trim title if i select that.
after chancing panels-pane.tpl.php, i managed to trim title but if i select "Link the node title to the node" it doesn t work at all.
<?php if ($title): ?>
<?php $s=strlen($title);
if($s>15): ?>
<?php print substr($title,0,15)."...";?>
<?php else:?>
<?php print $title; ?>
<?php endif; ?>
<?php endif;?>
how can i link title to node ? help me please.
thank you.
Comments
Comment #1
h.parsi CreditAttribution: h.parsi commentedthank you.
this code is correct.