Submenus in Lists

Hi Scott,
I did get a lot of mileage out of the previous suggestions/assistance with the numbered & ordered lists.

To further explore this topic of list I was wandering if Text Blaze has the capacity of sub-menus.

For example
Indication for Colonoscopy

  1. Diagnostic
  2. Surveillance
    3 Therapeutic

With Option 1 (Diagnostic) it could be for:

  1. Abdominal Pain
  2. Diarrhoea
  3. Rectal Bleeding
  4. Constipation

With Option 2 ( Surveillance) it could be for:

  1. Family history of Colon Cancer
  2. Personal history of Colon Cancer
  3. Personal history of Colonic Polyps
  4. Personal history of Crohn's Disease
  5. Personal history of Ulcerative Colitis

With Option 3 ( Therapeutic) it could be for:

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F

The {formmenu} command unfortunately doesn't support submenus.

You could however approximate your desired behavior with multiple {formmenu} commands that are incrementally revealed.

E.g.

Favorite Animal Type: {formmenu: Cat; Dog; cols=10; name=top}{if: top == "Cat"}{formmenu: Siamese; Tabby; cols=10}{else}{formmenu: Terrier; Labrador; Golden Retriever; cols=10}{endif}

That would work.
What are cols=10?
How does one make 3 submenus by 6 submenus by a further 2 or 3 if required (ie 3rd tier)?

cols is short for columns and sets the size of the menu in character columns. The default menu width is pretty wide to have multiple menus next to each other.

You can nest your submenus within multiple layers of {if} commands to create arbitrary menu structures.

E.g. This adds a third layer to the cat option:

Favorite Animal Type: {formmenu: Cat; Dog; cols=10; name=top}{if: top == "Cat"}{formmenu: Siamese; Tabby; Persian; cols=10; name=cat}{if: cat == "Siamese"}{formmenu: Striped; Not Striped; cols=10}{elseif: cat == "Persian"}{formmenu: Splotchy; Not Splotchy; cols=10}{elseif: cat == "Tabby"}{formmenu: Cute; Not Cute; cols=10}{endif}{else}{formmenu: Terrier; Labrador; Golden Retriever; cols=10}{endif}

You can have any number of {elseif} commands in an {if} block. Please note that {elseif} is a new feature which is currently being incrementally released to all Text Blaze users so you may or may not have it in your extension yet depending on whether it has rolled out to you yet (it is available for all users in the web UI though). You can achieve the same thing as {elseif} using nested {if}'s but it is a bit messy. It should be be available in everyone's extension by Monday.

Thanks Scott - certainly works. Extremely useful command/extension for multilayered listed.

George M