History: Wiki-Syntax Lists
Source of version: 72 (current)
Copy to clipboard
! Wiki-Syntax Lists In [https://tiki.org|Tiki] Wiki pages and other contexts that support Wiki formatting (including articles, forums, and blogs), you can easily create bulleted, numbered, and definition lists. In numbered lists, [https://tiki.org|Tiki] numbers the items automatically. You can also create nested lists. The following sections explain the details; see the Quick Reference for an overview. Scroll down to Help! if something goes wrong. In this page: !! Quick Reference {FANCYTABLE(head="To Create... | Use | Example",sortable="n")}Bulleted list | __*__ (asterisk) | ~np~*~/np~ Item %%% ~np~*~/np~ Item %%% ~np~*~/np~ Item Numbered list | __#__ (hash) | ~np~#~/np~ Item %%% ~np~#~/np~ Item %%% ~np~#~/np~ Item Definition list | __;__ (semicolon) | ~np~;term:definition~/np~ {FANCYTABLE} {icon name=thumbs-o-up} If you forget which character to use while you're editing, click the __Wiki Quick Help__ tab. !! Creating a Bulleted List If you type an asterisk (*) at the beginning of a line, Tiki places a bullet (a black dot) at the beginning of the line. The line is indented and formatted with a hanging indent, so that second and subsequent lines are indented and aligned with the first line. To create a bulleted list, do the following: # Place the insertion point at the ''beginning'' of the line. # Type an asterisk. # Type the item's text. # Press Enter. Example : * I put an asterisk at the beginning of this line * And on the second too * and on the third * And you can see all the lines aligned. !! Creating a Numbered List If you type a hash mark (#) at the beginning of a line, Tiki numbers the line and indents it from the left margin. The item's text is formatted with a hanging indent, so that second and subsequent lines are indented and aligned with the first line. To create a numbered list, do the following: # Place the insertion point at the ''beginning'' of the line. # Type a hash mark. Tiki supplies the period automatically. # Type the item's text. # Do one of the following: ## To continue typing items, press Enter once, and go to Step 2, above. ## To stop typing the list, press Enter twice. {icon name=thumbs-o-up} If you place more than one numbered list in a page, the items are separately numbered. !!! Multilevel style numbering Since ((Tiki18)) one can make numbered lists output unique numbers for each sub-item instead of reseting the counter to 1. For example, when it is wrapped in a ((PluginDiv)) with -+class="uol"+- parameter: {CODE(colors="tiki" theme="default")}{DIV(class=uol)} # Item 1 ## Sub-item ### Sub-item ### Sub-item #### Sub-item #### Sub-item #### Sub-item # Item 2 ## Sub-item ## Sub-item ### Sub-item ### Sub-item #### Sub-item #### Sub-item # Item 3 ## Sub-item ### Sub-item {DIV} {CODE} The output should be something like this image: {img type="src" src="display1407" thumb="box" width="160" desc="Default Bootstrap theme look in Tiki 18" styleimage="border"} How it is rendered on this page: {DIV(class=uol)} # Item 1 ## Sub-item ### Sub-item ### Sub-item #### Sub-item #### Sub-item #### Sub-item # Item 2 ## Sub-item ## Sub-item ### Sub-item ### Sub-item #### Sub-item #### Sub-item # Item 3 ## Sub-item ### Sub-item {DIV} {REMARKSBOX(type="tip" title="Tip")}Enable "Multilevel style numbering for ordered lists" preference ( -+wiki_make_ordered_list_items_display_unique_numbers+- ) on the "Editing and Plugins" control panel to apply this globally on all ordered lists rendered in Tiki. If you want to opt-out some list from this formatting, you can then wrap it in a div with class -+nouol+-. {REMARKSBOX} !! Creating a Nested List A ''nested list'' is a bulleted or numbered list that has more than one level -- that is, some items have "sub-items". To create a nested list, type two or more asterisks (bulleted lists) or hash marks (numbered lists) at the beginning of the line, as shown in the following examples: ~np~* Level 1 (bulleted list)~/np~ ~np~** Level 2 (bulleted list)~/np~ ~np~*** Level 3 (bulleted list)~/np~ ~np~# Level 1 (numbered list)~/np~ ~np~## Level 2 (numbered list)~/np~ ~np~### Level 3 (numbered list)~/np~ !! Creating an Outline Numbered List You can add some custom CSS to a page by using the (PluginHTML|HTML Plugin). {HTML()}<style type="text/css"> .mylist ol { list-style-type: decimal; } .mylist ol ol { list-style-type: lower-alpha; } .mylist ol ol ol { list-style-type: lower-roman; } </style> {HTML} {CODE(wrap="0" colors="css" theme="default")}{HTML()}<style type="text/css"> .mylist ol { list-style-type: decimal; } .mylist ol ol { list-style-type: lower-alpha; } .mylist ol ol ol { list-style-type: lower-roman; } </style> {HTML} {CODE} The following {CODE(colors="tiki" theme="default")}{DIV(class=mylist)} # Level 1 ## Level 1 a # Level 2 ## Level 2 a ## Level 2 b ### Level 2 b i ### Level 2 b ii # Level 3 ## Level 3 a {DIV} {CODE} Will show as {DIV(class=mylist)} # Level 1 ## Level 1 a # Level 2 ## Level 2 a ## Level 2 b ### Level 2 b i ### Level 2 b ii # Level 3 ## Level 3 a {DIV} !! Bullet list example: * This is a Level 1 item. * This is another Level 1 item ** This is a Level 2 item. * Yet another Level 1 item. ** This is a Level 2 item. *** Sub-items can have their own sub-items! This is Level 3. * Back to Level 1. {icon name=thumbs-o-up} In a bulleted list, you can create additional sub-levels beyond the third level, but Tiki doesn't use distinctive bullets beyond Level 3. !! Numbered list example: Here's a numbered list with nested levels: # This is a Level 1 item. # This is another Level 1 item ## This is a Level 2 item. # Yet another Level 1 item. ## This is a Level 2 item. ## Another Level 2 item. Note the numbering. ### Sub-items can have their own sub-items! This is Level 3. # Back to Level 1. {icon name=thumbs-o-up} You can create deeper levels of nesting, but doing so might prove confusing to your readers. !! Combined Bullet and Numbered list example: __Syntax:__ {CODE()} * Level 1 (bulleted list) ** Level 2 (bulleted list) ### Level 3 (numbered list) ### Level 3 (numbered list) ** Level 2 (bulleted list) *** Level 3 (bulleted list) # Level 1 (numbered list) ** Level 2 (bulleted list) ## Level 2 (numbered list) ## Level 2 (numbered list) {CODE} __Result:__ * Level 1 (bulleted list) ** Level 2 (bulleted list) ### Level 3 (numbered list) ### Level 3 (numbered list) ** Level 2 (bulleted list) *** Level 3 (bulleted list) # Level 1 (numbered list) ** Level 2 (bulleted list) ## Level 2 (numbered list) ## Level 2 (numbered list) !! Adding Hidden Details An expandable area allows you to display the major items in your list by default. Every item is still there, but it needs to be expanded to become visible. An expandable area is created by adding a minus - character after the star * characters. * This is a Level 1 item. * This Level 1 item has Hidden Details. Click the Plus ~np~[+]~/np~ to open it. **- This is a Level 2 item. Clicking the Minus ~np~[-]~/np~ will close it. ** This Level 2 item did not need the minus character. * Back to Level 1. {icon name=thumbs-o-up} Expandable areas work with Bulleted and Numbered lists. !! Multi-line Items Text can be forced to continue at the same indentation level in a list without having a bullet or a Number assigned to it. This is accomplished by having a Plus + character start each line. The number of Plus characters controls the indentation level. * This is a Level 1 item. + This line begins with a single Plus character ** This is a Level 2 item. ++ This line begins with a 2 Plus characters * Back to Level 1. {icon name=thumbs-o-up} Expandable areas work with Bulleted and Numbered lists. !! Creating a Definition List A ''definition list'' displays a term that is aligned flush left; the term's definition is positioned on the subsequent line and indented. Here's an example: ;unordered list:A list in which the order of the items is unimportant; also called a bulleted list. To create a definition list, do the following: # At the beginning of a line, type a semicolon (;). # Type the term to be defined. # Type a colon (:). # Type the definition. ** Your line should look like this: ;''term'':''definition'' # Press Enter. # Do one of the following: ## To type another item, go to Step 2, above. ## To end the list, press Enter again. {icon name=thumbs-o-up} Better definition lists can be created using the DL plugin. !! Creating a Table of Contents List Use the ~np~{maketoc}~/np~ plugin to automatically create a table of contents, based on the headings on the current wiki page. For example, using ~np~{maketoc}~/np~ on this page will produce: ^{maketoc}^ You can use the following options to customize the table of contents list: {FANCYTABLE(head=>Option ~|~ Description ~|~ Valid Values)} type ~|~ For backwards compatibility from older syntax: __~np~{maketoc:box}~/np~__. Optional. ~|~ box maxdepth ~|~ Defines how many heading levels to include in the list. If __0__, then ''all'' headings will be included. Default = __0__ ~|~ Numeric title ~|~ Title (heading) of the table of contents. Use __title=""__ to have no title. Default = __Table of Contents__ %%% Note: The __title__ will be translated, if available. %%% Introduced in 1.9.10 ~|~ Alphanumeric showhide ~|~ Create a link that will collapse (that is, hide) the table of contents link. Default = N~|~ Y or N nolinks ~|~ Create the table of contents ''without'' links. Default = __n__ (links ''will'' be created). ~|~ Y or N nums ~|~ Specify if the items in the table of contents listing should be numbered. Default = __n__ (use bullets instead of numbers). ~|~ Y, N, Force (same as Y) {FANCYTABLE} !!! Remarks ~np~{maketoc:box}~/np~ produces a table of contents without respect to the hierarchical order. __Example:__ {maketoc:box} !! Related pages * ((VideoTutorial-404|The wiki syntax in Tiki - Video Tutorial)) ~tc~(alias(WikiListDoc))~/tc~