|Showing only Intro text using pagebreak [message #103263]
||Fri, 30 July 2010 01:04
Registered: July 2010
Im sorry to add an extra entropy to the Symfony forum lol.
I'm creating a blog, and I want only top part of the text to be shown on the index page.
I have successfully integrated tinyMCE editor and pagebreak functionality to add <!-- page break --> to the text.
Now I created getIntroText() function in my blog model.
but I'm stuck. I thought I could just get rid of everything after the page break and return the rest of the top part.
But that breaks the HTML code like missing closing </div> tag
Is there any simpler way (plugin or Symfony class) that can return intro text while preserving the HTML tag?
I was going to create a stack that parses all HTML tag and automatically add closing tags, but this already sounds too complicated! x[
Thank you for all your help!!
[Updated on: Fri, 30 July 2010 01:05]