Loading...
 
Skip to main content

Features / Usability


You are viewing a reply to Adding page description to tiki-listpages

Re: Adding page description to tiki-listpages

That would either be

{$listpages[changes].data|truncate:150:"...":true}

or

{$listpages[changes].cache|truncate:150:"...":true}

Both have problems.

The 'data' version is unparsed; i.e., it will not convert a to the start of the table of contents, etc. You could add a line to parse the page in the php file and then return the first 150 characters of that, but that would be horrifically slow (you could also parse just the first 150 characters, but that may result in errors, such as if you get only part of a wiki-plugin).

The 'cache' version is parsed, but...
1) it may not exist
2) limiting the number of characters will likely result in malformed HTML. You could translate the < and > to &lt; and &gt;, but again, that would be slow.