Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Makes automated excerpts in WolfCMS
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
Readme.textile
disable.php
enable.php
index.php

Readme.textile

About

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.

Installation

Like any other WolfCMS plugin:

  • download the plugin (you may have to rename folder to “truncate”)
  • unpack it under wolf/plugins/ directory
  • go to Administration→Plugins and enable it

Usage

Making excerpts on your /articles page:

<?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, "&hellip;");
		echo "$myarticles";
	?>
</div>
<?php endforeach; ?>

For more examples visit Truncate page at Project 79.

Changelog

0.0.2

  • fixed bug with Strict Standards (thanks to Tina)

0.0.1

  • initial release

Licence

Classic GPL License
Copyright by Dejan Andjelkovic, 2010

Something went wrong with that request. Please try again.