hi,
While using ditto to aggregate blog pages I use blog Tpl in which I want to read first few lines of the content. Just [+content+] gives the whole content but I want starting few lines.
I use modx evo 1.0.4
thank you.
-
☆ A M B ☆
- 24,524 Posts
You can use Ditto’s internal phx modifiers to control the length of the output.
will display the first 200 chars of the content.
Susan - is there a way to change this from characters to a word amount?
Characters will often truncate a word which is not ideal but if it could stop after a certain amoutn of words, this would be ideal.
-
☆ A M B ☆
- 24,524 Posts
You’ll need to add a custom modifier for it.
Create a snippet named "phx:word_limit" with this code-
http://wiki.modxcms.com/index.php/PHx/CustomModifiers#phx:word_limit
Then use
[+content:word_limit=`20`+]