This plugin allows you to make automated excerpts by entering number of characters.
Current version: 0.0.2
Tested with 0.6.0 and 0.7.5.
Like any other WolfCMS plugin:
- download the plugin (you may have to rename folder to “truncate”)
- unpack it under
- go to Administration→Plugins and enable it
Making excerpts on your
<?php $last_articles = $this->children(array('limit'=>5, 'order'=>'page.created_on DESC')); ?> <?php foreach ($last_articles as $article): ?> <div class="entry"> <h3><?php echo $article->link($article->title); ?></h3> <?php $myarticles = truncate($article->content(), 300, "…"); echo "$myarticles"; ?> </div> <?php endforeach; ?>
For more examples visit Truncate page at Project 79.
- fixed bug with Strict Standards (thanks to Tina)
- initial release
Classic GPL License
Copyright by Dejan Andjelkovic, 2010