I am using Ditto to display a list of links to articles and I want to use &extenders=`summary` to generate a summary of the article. I do not wish to use introtextbecause this site will be handed over to clients who are unfamiliar with HTML and CMSes, and I want them to fill out as few fields as possible when adding new articles. By using summary, it will be generated automatically, rather than having to count and copy the first x number of characters from the article into introtext.
The problem I am having with summary is that the code generated by ditto surrounds the summary with a <p> tag. This is fine, but the [+link+] is inserted in the code after the </p> tag and thust forced onto the next line. I want the "Read more" link to be on the same line as the summary. If I put text into the introtext field, the code ditto generates does NOT surround this text with a <p> (which in itself is poor form for semantic html), ad as such renders the Read more link on the same line.
Is there any way to cause the </p> tag to be rendered *after* the [+link+]?
Thanks in advance for the help. If you need to see any of my code, just let me know and I can share it here.
Ditto does not wrap the summary nor the introtext in a p tag. All formatting is up to the user in his or her template. What is most likely happening here is you are using TinyMCE or another RTE. These editors have a tendency to wrap the content your write in a p tag. Check the content of your page to make sure it is not wrapped in p tags.
Of course, I thought that may have been the source of the <p> but forgot about thatw hen I posted.
I edit in HTML, but I surround all paragraphs in <p> tags, so that I can format the text and also just for good HTML syntax. I guess I assumed that Ditto would strip the HTML for the summary. Is there no way then, that I can keep my text content marked up with tags and still have the "Read more" link on the same line as the summary?
Incidentally, one thing that confused me and made me thing it was Ditto putting the <p> tag in, was that there is a closing tag at the end of the summary. Even though I have set a character limit to the summary, and usually the summary doesn’t end exactly at the end of the </p> tag, the summary is always closed. How does this happen and would it be a possibly way to work in the [+link+] before the </p>?
Brilliant! That did exactly what I need. Thanks so much for the help!