I've run into the problem of having complex html with teasers. The teaser doesn't know how to properly close the html it's working with. The page with the teaser becomes a mess of html.
My situation involves three experienced html users who are moving a 320 page static site to drupal. Rather than mess with complex algorithms to figure out what to close I figured I'd just let the html users do it.
A fairly easy fix is to extend the <!--break--> comment to allow some extra html to be inserted for teasers. I modified node.module to allow this.
Is this something that others would be interested in:
1) <!--break--> works exactly as it did in 5.x. It serves as the marker for where to break the teaser.
2) <!--break extra stuff--> also serves as the marker for where to cut the teaser but "extra stuff" gets added to the end of the teaser.
So ugly markup that may need a table properly closed could:
<table>
<tr><td>lots of stuff</td><td>more stuff</td></tr>
<tr><td>lots of stuff</td><td>more stuff</td></tr>
<!--break </table>-->
<tr><td>lots of stuff</td><td>more stuff</td></tr>
<tr><td>lots of stuff</td><td>more stuff</td></tr>
</table>
Or you could even do
<!--break my own teaser goes here-->
All of the other page code goes here
If the response isn't too negative to the idea I'll post the code here.
Comments
Submit as Issue!
I think this is definitely a good idea, providing a very useful feature. But posting to the forums is a waste of time in this case, assuming that you'll like to see it in future Drupal versions.
I would recommend you to submit this thing, along with the code, as Issue to the Drupal project (http://drupal.org/project/drupal). It is clearly a "feature request", so the submit-form is here: http://drupal.org/node/add/project_issue/drupal/feature - you should probably target version "7.x-dev", being one of the first to request features for the future Drupal 7, because (as I uderstand this) the version 6 is already frozen, as for new features. (It's also a good idea to put a link to the new Issue here, then.)
My another comment: Teasers handling (unless this is already done in upcoming Drupal 6) needs further changes, to allow proper teasers being created from CCK content types (currently shows full node as teaser).
Thanks for the help
Thanks for the help!
I posted the feature request along with the code at: http://drupal.org/node/169292
Mixing tables and "break"
Mixing tables and "break" tag aren't good idea (IMHO).
If you need tables on your nodes, you could consider Excerpt Drupal module (http://drupal.org/project/excerpt). In that scenario, you can create content for body and for teaser independently.
---
Drupal Theme Garden
Modules work too
Currently "break" in a table leads to html trouble - no doubt. This proposed solution is a simple "non-module" way to get a little more control right at the break comment.