hissy 様
いつもご教示ありがとうございます!
Re: Designer Content Proはどうでしょう
2014年7月9日 at 21:55
こんにちは。
Designer Content で作ったテキストエリアで文字数の制限をしたいのですがどうすればよいのでしょう。制限数を過ぎたら (...) をつけられれば尚よいのですが。
該当の箇所は以下の通りです。
<div class="inhalt">
<?php $item->inhalt->display();?>
</div>
ご教示いただけると幸いです。よろしくお願いいたします。
Your post has been saved and will be published after approval by the forum moderator.
takuro hishikawa
Re: Designer Content Proはどうでしょう
<?php
$th = Loader::helper('text');
$text = $item->title->getText();
$text = $th->wordSafeShortText($text, 32, '...'); // 32は制限する文字数
echo $text;
?>