-
☆ A M B ☆
- 209 Posts
Is there a way to call the character count of a placeholder and use that in a conditional output modifier?
As an example: If the content of an article/resource is greater than a certain number of characters, it won't just add ellipses, but also show a link to the full article? This is what I have now, but I can't figure out how to use character count for conditional statements.
[[+content:ellipsis=`300`]]
Is this possible?
Thanks guys!
Ben Morrison
Hacking templates to pieces since 2003
discuss.answer
-
☆ A M B ☆
- 3,141 Posts
Could do that with output modifiers if you want to, tho a snippet would probably be more flexible:
[[+content:len:gt=`200`:then=`<a href="[[~[[+id]]]]">Read more</a>`:else=`That's all folks!`]]
-
☆ A M B ☆
- 209 Posts
Thanks Mark! I misunderstood the documentation
Ben Morrison
Hacking templates to pieces since 2003