Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Harlowe and conditional lists?

Hey all! Just got started with 2.0 and Harlowe, feel like I've got a feel for the basic macros, but I can't figure this one detail out by myself and haven't had luck searching it so far...

I want to have an unordered list where some of the items will appear or not based on the status of my variables, but it keeps getting broken up into seperate lists with extra whitespace between them. Here's a sample of my code...

* Go back downstairs->Living room
(if: $wandstatus is 1)[* Go to the upstaris hallway.->South hallway]
(if: $wandstatus is 1)[* Go up to the attic.->Attic ]

Can anybody help point me in the right direction? Thanks muchly.

Comments

  • It appears that the Harlowe's markup based list does not support having a macro call between two list items, it causes each of the list items to appear within it's own list.

    Sometimes resorting to HTML is the best solution:
    {<ul>
    <li>[[Go back downstairs->Living room]]</li>
    (if: $wandstatus is 1)[<li>[[Go to the upstaris hallway.->South hallway]]</li>]
    (if: $wandstatus is 1)[<li>[[Go up to the attic.->Attic]]</li>]
    </ul>}
    
  • Right, okay! A very good lesson to bear in mind, as my HTML-fu is strong. Thanks for the quick response!
Sign In or Register to comment.