-
☆ A M B ☆
- 209 Posts
One quick question and one other that I couldn't find in the documentation. How would one utilize multiple output modifiers? My RSS item chunk is below, but I would also like to add the modifier
ellipses to the content tag. How would I add a second modifier in addition to
toCDATA?
<item>
<title>[[+pagetitle:toCDATA]]</title>
<link>[[~[[+id]]]]</link>
<guid>[[~[[+id]]]]</guid>
<pubDate>[[+createdon:strtotime:date=`%a, %d %b %Y %H:%M:%S %z`]]</pubDate>
<description>[[+content:toCDATA]]</description>
</item>
My second question, is there a way to use an output modifier so that when the ellipses character count is reached, it would display an html link to the full document? I get the basics of conditional outputs but I'm not sure how to reference the character count of a template variable and not just it's content. Am I making any sense?
Thanks!
B
Ben Morrison
Hacking templates to pieces since 2003
The cdata (not CDATA) modifier will "wrap" the content using ellipsis (not ellipses) could cut off the closing CDATA tag. It might work if you put the ellipsis modifier first:
[[+content:ellipsis:cdata]]
If you don't need the dots, you can use the 'limit' modifier instead of ellipsis. If you want the dots after the CDATA block, you can do this:
[[+content:limit:cdata]] . . .
If none of that works, you can write your own custom modifier to do whatever you want with what's produced by the tag.
-
☆ A M B ☆
- 209 Posts
Thanks, exactly what I needed.
Ben Morrison
Hacking templates to pieces since 2003