Help - Search - Members - Calendar
Full Version: creating lists in an entry
Movable Type Community Forum > Additional Resources > Tips and Tricks
bmk
One thing you could do is disable "convert line and paragraph breaks" in blog config.

But if that's not what you're looking for, you need to write your list code so that there are no line breaks in it.

And, start your list with an </p> and end it with a <p> (because with paragraph breaks on, your post will start with a <p> and end with a </p>)

Sample post:

CODE
.....and here's my list:</p> <ol><li>first item <li>second item <li>third item </ol> <p>What do you think of that?


Does that help?
Brenna
JoshuaKaufman
I would like to keep "convert line and paragraph breaks" turned on but still keep MT from automatically adding BR tags after each of my OR and LI tags.  I know that BR tags don't affect the way the list looks in most browsers but it's all about valid HTML baby!  bmk's response looks like it will do what I want, but it would be really nice if there was code that would tell MT to not mess with a certain area of an entry.  Anyone else think this is worth a feature request?
JoshuaKaufman
My weblog is currently set up to automatically insert BR and P tags in entries. However, this becomes a problem when I want to put something like an ordered or unordered list in an entry.  What happens is that I'll insert the OR and LI tags but then Moveable Type automatically inserts BR tags after them, making the HTML invalid.  Is there anyway to tell Moveable Type to not insert BR and P tags within a certain area of an entry?  Any ideas?  Thanks!  smile.gif
kadyellebee
Joshua,

I have "convert line and paragraph breaks" on in my configuration, but I haven't ever had problems with this breaking my lists.  

I know that when I hit enter at the end of a li line, I get a br in my source, but it doesn't really seem to affect how the list looks.  Feel free to check out hopelessromantics - I have a post on the top of the journal right now with list items, and you can view the source and see how MT is rendering them with br's after the lines.

Kristine
kadyellebee
Well, if its really bothering you to have an extra br inserted, you could always type your lists like this:
CODE
<ul><li>list item 1<li>list item 2<li>list item 3</ul>
and then you wouldn't get any breaks.

Kristine
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.