<?php $this->widget('Widget_Contents_Post_Recent')
->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
如何实现控制字数?希望能够得到解答。
版主: seita
<?php $this->widget('Widget_Contents_Post_Recent')
->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
<?php $this->widget('Widget_Contents_Post_Recent')
->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
代码: 全选
<?php $this->widget('Widget_Contents_Post_Recent')->to($post); ?>
<?php while($post->next()): ?>
<li>
<a href="<?php $post->permalink(); ?>" title="<?php $post->title(); ?>"><?php $post->title(25, '...'); ?></a>
</li>
<?php endwhile; ?>