We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24495
    • 407 Posts
    Is it possible to define an anchor (a name="split")(/a) as splitter? And how? Look at many current blogs: if I click the "read more" link of a summary I reach the anchor where the document is splitted by and not the top of the full article.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Should work. Give it a try.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 24495
        • 407 Posts
        Doesn’t work. That’s the Ditto call I tried:
        [[Ditto? &tpl=`myTemplate` &summarize=`10` &startID=`1` &trunc=`1` &truncSplit=`1` &truncAt=`<a name="split">`]]

        Any ideas? Tnx
          • 24495
          • 407 Posts
          Nobody knows a solution?
            • 18397
            • 3,250 Posts
            Moved to Ditto forum.

            Try &truncAt=`<a`
              • 24495
              • 407 Posts
              Tnx Mark, it workes. For others also interested in this:

              It workes also with
              &truncAt=`<a name`
              if you want to differ between links to internal or external pages and the anchor inside the current article. Why? Maybe you have links to other pages in your summary text prior to the anchor and want to avoid truncating at the first link instead of the anchor!

              In RTE you have two ways to set the anchor: at the end of your summary text or at the beginning of the following text.

              Effects: in first case you’ll get the correct summary text but jumping to the anchor will show the last line of the summary text at the top of the page.
              In second case the landing point is the first line of the following text but you have an empty paragraph rendered at the end of your summary text.

              You must decide for yourself which way is the best for you. And: don’t forget to alter the "read more" link in a customized chunk pointing to the anchor.