We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36549
    • 572 Posts
    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
      • 33997
      • 150 Posts
      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
        • 36549
        • 572 Posts
        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
          • 16278
          • 928 Posts
          The default <!-- splitter --> marker seems to work for me. Are you sure that the HTML comments are still there in your published page? I suspect some of the RTE settings might include deletion of comments as "tidying", and I know that comment markers are not among the standard "allowed" set of things in angle brackets that pkBlog/PubKit will output.

          A workaround if the mystery cannot be solved: you can set the splt marker to be four consecutive spaces (you may still need to enter as HTML to keep TinyMCE from turning them into &nbsp; entities). Ditto picks that up for the split, but the spaces are invisibly collapsed into a single one as usual.
          laugh KP
            • 36549
            • 572 Posts
            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:
            &lt;!--splitter --&gt;

            I really need it to work by simply adding within the content area....any ideas?
              www.9thwave.co.uk
                 WEB | DESIGN | PRINT
              • 33997
              • 150 Posts
              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
                • 16278
                • 928 Posts
                @janice171 - I know what you mean. Hate to say it, but score one to Wordpress for that little "read more" button in its editor which behaves just as you’d like. With Ditto I don’t think tere’s any instant easy solution. A plugin probably won’t do it. as it has to act differently on the output from the tpl chunk and the full page. Maybe PHx can help, if you have it installed as a plugin. I’m sure there’s a CSS solution (wrap the "read more" link in a SPAN that’s display: none in the full page), but you still have the problem of a foolproof way of adding it to the split marker via TinyMCE.

                I don’t think updating the Ditto code is an option, since, Ditto has nothing to do with outputting the full post.

                sad KP
                  • 26903
                  • 1,336 Posts
                  You could probably use a plugin look for &lt;!--splitter --&gt in the content and change it to <!-- splitter --> when you save the document.
                    Use MODx, or the cat gets it!
                    • 36549
                    • 572 Posts
                    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
                      • 26903
                      • 1,336 Posts
                      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!