Example 5 Adding a column as a dropdown metadata Yes/No selection for each item
You can define a column as a selection.
Let's say we need to define whether or not the oviparous (the egg laying animals) are swimmers.
So we add the following list macros:
list
macro filtered by the label oviparouslist-excerpt
macro to display the classification in a column.list-select
macro with the values yes and no, for the last column of the list.
Note that for the list-select
macro that we didn't select the checkbox for Use labels, meaning that we are using a metadata value instead of a label.
{checklist:label=oviparous|name=Swimmers|useboards=false} {checklist-excerpt:heading=Classification|width=10} {checklist-select:heading=Can swim?} Yes No {checklist-select} {checklist}
This displays the following lists:
The metadata value for the Can Swim? metadata can be accessed later using list-attribute
or any of the Comala Metadata macros:
For the list-attribute
macro, we indicate the attribute and the page.
If the page is left blank in the Edit macro dialogue box, the macro will seek the Can Swim? metadata value from the current page.
In our example, the metadata values are displayed for the page specified in each of the macros.
Note that the example uses a Confluence table to display each question and the metadata value.
Can eagles swim? {checklist-attribute:attribute=Can swim?|page=Bald Eagle} Can frogs swim? {checklist-attribute:attribute=Can swim?|page=Common Frog}
Example 6 Adding a column as a dropdown label selection for each item
A list-select
macro selection could use labels instead of metadata values.
Similar to Example 2, but in this example the actual labels used are bird
, fish
, mammal
, amphibian
or reptile
but each option could have a different value from the actual caption.
For example, the caption for the label fish is It's a fish, or for bird is It's a bird.
In the body of the list-select
macro each caption is defined as <value>|<caption>.
The <value>
is the actual label, the <caption>
is the actual caption displayed.
The markup for this example is:
{checklist:label=oviparous|name=The oviparous|useboards=false} {checklist-select:heading=Type|uselabels=true} fish|It's a fish amphibians|It's an amphibian reptile|It's a reptile bird|It's a bird {checklist-select} {checklist}
Example 7 Adding a column as a dropdown user selection for each item
Users can also be selected using the list-select
macro.
You can configure the list-select
macro using the Edit macro dialogue box.
Users can be added as choices in the drop-down menu on the page by either:
- using a Confluence group name to allow selection from the users who are members of the group.
- using all to allow selection among all the existing users in the instance.
{checklist:label=pets|name=Alpha Centauri Pets|useboards=false} {checklist-select:heading=Lead Owner|usersgroup=all} {checklist-select} {checklist}
In the list-select
macro
- if there is only one option to select from and
store
is set tochecklist
- then the column is handled as a checkbox ( ).
See Example 11.