Hi,
I would like to truncate the content of a page at a specific point and reading through the Ditto docs it suggests to me that the <!-- splitter --> can do this but i really don’t understand how this works. I’ve tried various ways and can only assume i am doing something wrong and not fully understanding this.
Could anyone give an example please?
Thanks
J
www.9thwave.co.uk
WEB | DESIGN | PRINT
Are you using Evo or Revo?
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner
Hi,
I’m using evo 1.0.4.
At the moment i’m using the &truncLen=`400` &truncOffset=`90` in order to truncate the posts but it sounds like i should be able to add a bit of code like <!-- splitter --> at an exact point in the page where i want it truncated, or am i mistaken?
Cheers
www.9thwave.co.uk
WEB | DESIGN | PRINT
-
☆ A M B ☆
- 24,524 Posts
If you have the ’summary’ extender enabled (&extenders=`summary`):
&truncAt
Pur: Location to split the content at
Opt: Any unique text or code string
Default: ”<!-- splitter -->”
Hi,
Yes i have the summary extender enabled.
Sorry but i’m still ot grasping this.
Do i have to explicitly write in the ditto call "&truncAt=`splitter`"? or do have to write it differently i.e. <!--splitter-->?
But then how do i reference this within the pages content at the truncate point?
Thanks
www.9thwave.co.uk
WEB | DESIGN | PRINT
-
☆ A M B ☆
- 24,524 Posts
If you don’t use the &truncAt= parameter, it will use <!-- splitter --> by default. Or you can use the &truncAt= parameter to make it split at whatever you want.
ok, i understand that but what do i physically have to add within the content where i want the text truncated?
i tried <!--splitter--> but nothing happens.
Thanks
www.9thwave.co.uk
WEB | DESIGN | PRINT
-
☆ A M B ☆
- 24,524 Posts
I think there is a space between the -- and the word on both sides.
thanks, it finally works.
Now do you know if there is any way this can be added within the content rather than in the html?
I’ve tried it in a chunk but it doesn’t appear to work.
Thanks again
www.9thwave.co.uk
WEB | DESIGN | PRINT
Yeah, putting it in the content area works for me. Just be sure it’s:
<!-- splitter -->
and not anything else like
<!--splitter--> or <!-- splitter-->