We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6316
    • 92 Posts
    Hello,
    I’ve got a small problem in Ditto. On my home page there are news which are being displayed by [+summary+] and [+link+] after that. The question is, how to make that [+link+] goes exactly after [+summary+] text ends? In other words, I need to add the [+link+] inside <p> tag which surrounds [+summary+] by default...

    For example, here is what it is like now:
    Sed in justo. Praesent nec augue. Aliquam erat volutpat. Nulla dictum. Sed eget nibh quis arcu vehicula mattis. In hac habitasse platea dictumst. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer imperdiet. Ut vitae nisi eu risus lobortis vehicula. Etiam pulvinar.

    Read more...

    and I want like this:
    Sed in justo. Praesent nec augue. Aliquam erat volutpat. Nulla dictum. Sed eget nibh quis arcu vehicula mattis. In hac habitasse platea dictumst. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer imperdiet. Ut vitae nisi eu risus lobortis vehicula. Etiam pulvinar. Read more...

    The chunk I use for Ditto:
    <h3>[+pagetitle+]</h3><span class="postinfo">by [+author+] on [+date+]</span><hr />[+summary+][+link+]


    Thanks in advance.
      • 18397
      • 3,250 Posts
      The p tags surrounds your content only if you use a rich text editor like TinyMCE. If you remove those tags you should be in business.
        • 6316
        • 92 Posts
        Well, I don’t want to deprive my news writers of using TinyMCE either smiley
          • 19638
          • 39 Posts
          In this case maybe you can try to keep the <p> tags and change the layout with css.
          Something like :
          HTML :
          <span id="summary">[+summary+][+link+]</span>


          CSS :
          #summary p {
            display:inline;
          }
          


          The use of the <span id="summary"> is for avoiding the change of the standard block behaviour of the <p> tag in all the page (but it it a bad and dirty trick i think).
            • 11975
            • 2,542 Posts
            Hi,

            another solution would be to ask redactors to write an introtext for each document.
            In that case, introtext will replace the truncated content.

            :-)
              Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
              • 17883
              • 1,039 Posts
              The use of the <span id="summary"> is for avoiding the change of the standard block behaviour of the <p> tag in all the page (but it it a bad and dirty trick i think).

              It´s dirty laugh

              Better would be:

              <div id="summary">[+summary+][+link+]</div>


              Because it´s not valid to put a block element (p) in an inline element (span) wink