Hi,
I it’s late to revisit this topic but i am still having problems.
I could get the splitter to work when i added &truncAt=`+splitter+` in the Ditto call and then added +splitter+ within the content area. The only trouble is that +splitter+ now appears in the body content of the site when the full article is displayed.
Clearly i am missing something out here so if anyone can offer any advice i would be very grateful.
Using EVO 1.0.2
Thanks
J
www.9thwave.co.uk
WEB | DESIGN | PRINT
Isn’t the whole purpose of the truncated command being in comments so that it won’t show up to the end user? If you want to use your own truncater, just surround it in an HTML comment as well, then it won’t ever show up to the end user.
"Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
Hi,
When i use <!-- splitter --> I can’t get it to work at all, it was only when i added &truncAt=`+splitter+` in the Ditto call that the truncation began to work correctly but at the expense of it displaying on the web page in the content area when the full article was displayed. Adding the comments tags does not work...well unless i turn off ’rich text’ but that’s not very client friendly.
If someone could post exactly what they are using in their Ditto call and in the content area (with rich text on) for the successful use of <!-- splitter --> it would be a great help.
Thanks
J
www.9thwave.co.uk
WEB | DESIGN | PRINT
Hi KP,
Thanks for replying.
Basically the <!-- splitter --> works if i add it to the html but if i add it in the content area (which a client would do) it doesn’t work and the html being generated is:
<!--splitter -->
I really need it to work by simply adding within the content area....any ideas?
www.9thwave.co.uk
WEB | DESIGN | PRINT
You could go hunting in the code for Ditto and add in some logic to remove the characters from output after finding the string....I don’t know how difficult that would be though.
"Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
You could probably use a plugin look for <!--splitter --> in the content and change it to <!-- splitter --> when you save the document.
Use MODx, or the cat gets it!
Hi Shamblett,
I’m not with you, I can easily make the alteration in the html manually but do you mean a plugin could be implemented to automate this?
Thanks
www.9thwave.co.uk
WEB | DESIGN | PRINT
Yes, when the client finishes editing the resource is saved, you could hook a plugin to the ondocformsave event which scans the content of the resource for whatever string you want to use as a delimiter and changes it to <!--splitter-->. This is then saved in the database this way, so if you pull up the page now its just an HTML comment, which is what you want. Its a bit broad brush if you leave it at that, it will do this on all saves, you could narrow it to specific user groups/doc groups if needed.
Use MODx, or the cat gets it!