Is it possible to truncate the introtext field? I like to use this field instead of the content field because the contentfield has html tags and classes that I do not want to have/use in my ditto output. so introtext would be the best option but i do not want people to have the option to keep on tpying. but I like to truncate this field.
Greets Dimmy
Not at the moment. However, in the next release it is.
Nice sirlancelot, thanks for the plugin code and Mark looking forward to the next release I love ditto.
I’ve been wanting a bit of the same... I’ve created a multilingual website; with a method I havent seen here:
created a new TV "content_en". I’ve put the regular [*content*] in a div with class "bla~nl" and [*content_en*] in a div with class "bla~en". With link extra css will be loaded and a cookie will be set to set the language: one of the divs will be hidden and the other will be visible. I’ve done the same with all other content, e.g. menutitle, etc.
Now, next item: Ditto & the summary extender. How can I add functionality so that I can truncate the english content in de blogview as well? [+summary+] uses summary and content. I leave summary purpusfully empty so that the content is truncated. For the english view I want the TV content_en to be shown and truncated ([+content_en+] is not trunctated as this is not caught by summary-extender). Could I duclicate the summary extender and rename all right the functions?? How could I fix this?
thnx!
Er... I’m not sure if I understand what you’re trying to do, because it doesn’t seem like it should be difficult at all to me. All you want to do is to truncate the output text in a Ditto call?
One way that seems like it would be easy to do this would be to write a simple snippet that returns the introtext of each document truncated to whatever length you want in the Ditto call, e.g.
[[truncateIntrotext? &docID=`[+id+]` &length=`120`]]
I can’t see any reason this wouldn’t work, but perhaps I’m not understanding what you’re trying to do?
-
☆ A M B ☆
- 24,524 Posts
I’ve used PHx to do this when I wanted a one-liner for a home page box, but a full intro for the main subject page.