ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Weblog Field to Bullet Points

June 09, 2010 10:28am

Subscribe [2]
  • #1 / Jun 09, 2010 10:28am

    Coop Job

    8 posts

    Hi all,

    I want to be able to have a single weblog field (textarea) that will have multiple lines of text. Each line will be displayed in its own <li> thereby letting me make a bullet-point list of tha single text area. I could use <li> html buttons in the weblog publish form but that would not be great for the end-users who would have to remember to do that.

    From searching the forms it seems this is possible but I can’t find an implementation with actual code.

    Thanks,

  • #2 / Jun 09, 2010 11:30am

    Cue

    98 posts

    I quickly mocked up this plugin for you.

    It basically splits all line breaks and appends the text in to an list item.

    For example:

    {exp:nl2li}List item 1
    List item 2
    This is another line break
    so on so forth…{/exp:nl2li}

    This will output:

    <li>List item 1</li>
    <li>List item 2</li>
    <li>This is another line break</li>
    <li>so on so forth…</li>
  • #3 / Jun 09, 2010 1:04pm

    Mark Bowen

    12637 posts

    Nice little plugin Cue although there is already a First Party plugin that could also be used to do this kind of thing - List Maker.

    Best wishes,

    Mark

  • #4 / Jun 09, 2010 1:07pm

    Cue

    98 posts

    Ahh of course. I did a search before hand, as you do. Fail.

    Thanks for pointing that out Marky B.

  • #5 / Jun 09, 2010 1:50pm

    Mark Bowen

    12637 posts

    Ahh of course. I did a search before hand, as you do. Fail.

    Nope definitely not a fail at all. It’s always nice to have more than one solution to a problem so the plugin you have provided I’m sure will come in handy for people definitely.

    Thanks for pointing that out Marky B.

    Wow haven’t been called that since my school days!! 😉

    Best wishes,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases