在使用 smarty 模板的文章网站上,我需要截断主要内容以创建预告片。我可以按字符截断,但第一段的长度从文章到文章是完全未知的。我想要更聪明的东西,只显示第一段:
内容:
This is my first paragraph and I want to display this and only this.
This the rest of the content and it is very long with a lot of words...
预告片:
This is my first paragraph and I want to display this and only this.