---
title: "Examples - list macro"
canonical: "https://support.appfire.com/space/CLSL/656579417/Examples%20-%20list%20macro"
format: markdown
---
> Macro (aura-html)

> Macro (legacy-content)

## Example 1 Managing lists of pages and their labels using list macros > Macro (anchor)



### Add the `list` macro

Let's say we have a page **Animal Farm in Alpha Centauri **as the parent of the pages for a range of different animals. 

![image](media://81b58487-5d98-4078-9f08-5f6f8f3e0cf1)

Add a `list` macro to the **Animal Farm in Alpha Centauri** parent page.

![image](media://c8b2b31a-43bc-4097-90b1-744b5a66bbdd)

Add  `mammal`, `oviparous` and `pet` as **List Labels** using the **Edit 'List' Macro **box.

![image](media://a3e39275-a39e-46d6-b179-fbcc53bfe01e)

All the children of **Animal Farm in Alpha Centauri** are shown.  The checks are for the labels `mammal`, `oviparous` and `pet`.

![image](media://e5a7de7b-b67d-4e78-8c3f-9464df2c4a4e)

> ℹ️ When any item of each list column is selected, the appropriate label is added to/removed from the page on the row.

This can be a very effective way to manage and change labels without having to individually edit each page.

You can add a new label to the **Edit macro** box and on the **Updated** page, amend the check for pages requiring the new label.

> 📝 The `pet`** **label is currently not applied to any of the listed pages. Simply toggle the check icon on each row to add the `pet` label to a linked page.

Add `list-label` macros to the `list` macro

**[list-label](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/656578375)** macro

**[list](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/655889865)** macro

One or more `list-label` macros can be added to `list` macro.

![image](media://644ab2e8-fb26-44a9-ab93-d8e1d89cc7e5)

Each of these additional macros can be edited.

![image](media://d95cd35a-9319-4b51-890c-c63a186ea006)

  
These macros can be used to set the column heading title for the label column or make the checks display as **read-only** preventing users on the published page with the list changing the label check.

![image](media://2dff9dda-9829-4016-aa66-82dd46640181)

##### **Markup**

```
{list:name=Animal Ark|useboards=false} {checklist-label:heading=Mammal|label=mammal}{checklist-label:heading=Egg Laying|label=oviparous}{checklist-label:heading=Household Pets|label=pet} {checklist}
```

## Example 2 Using list-excerpt and adding a dropdown option for your page labels in a list> Macro (anchor)



### **[list-excerpt](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/656578668)** macro

### **[list](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/655889865)** macro

### Add `list-excerpt` macro to `list` macro.

Let's add:

- the excerpt of each page
- restrict to show only the children of **Animal Farm in Alpha Centauri **that have the label `oviparous`
- make add a column as a selection (drop-down menu). This drop-down selection is from a list of labels `bird`, `fish`, `mammal, amphibian` or `reptile`

![image](media://5f1a95d9-bc87-4b37-b2c5-b9e756ca1247)

##### **Markup**

```
{list:label=oviparous|name=Oviparious|useboards=false} {checklist-excerpt:heading=Classification} {checklist-select:heading=label|uselabels=true} fish amphibian reptile mammal bird {checklist-select} {checklist}
```

![image](media://f1abd8b8-9050-4124-87be-d3082786e920)

## Example 3 Adding an editable comment column to your list> Macro (anchor)



### Add a comment heading column to a list

Let's restrict the display to only the children of **Animal Farm in Alpha Centauri** that have the label `pet`, and add a comment for each page on the checklist.

To achieve this, we add the `list-excerpt` macro with the heading **Classification**.

> ℹ️ We are going to add also a *comment-heading *with the title **Notes***.*This is a parameter of the `list` macro.

![image](media://5437ec0f-0f99-422d-82a5-53fa2cddb802)

The list has been named **Pets**. 

![image](media://fd0d8443-e226-4cb3-b8a5-6a48f7c23f25)

The published page list shows all content with the label `pet`. 

In the  `list` macro:

- the label `pet` has been used as a filter for the list and as checklist label to display the list column
- and editable comments column has been added with a heading **Notes**

The `list-excerpt` macro displays `excerpt `macro content from each of the listed content (pages).

##### **Markup**

```
{list:comment-heading=Notes|label=pet|name=Pets} {checklist-excerpt:heading=Classification} {checklist} 
```

**[list-wikiinput](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/655988417)**** **macro

The `list-wikiinput` macro can be used instead of the *comment-heading* to provide more detail over the columns (`width`, `rows` and `cols`).

| [Back to checklists User Guide contents](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=clsl&title=User%20Guide&linkCreation=true&fromPageId=656579417) |
| --- |
| [List of examples](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=clsl&title=Comala%20List%20Examples&linkCreation=true&fromPageId=656579417) |

### **Related links**

- [User Guide and list of the Comala Lists macros](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=clsl&title=User%20Guide&linkCreation=true&fromPageId=656579417)
- [Getting Started with Comala Lists](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/656675787)
- [list macro](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/655889865)
- [list-label macro](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/656578375)
- [list-excerpt macro](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/656578668)
- [list-wikiinput macro](https://appfire.atlassian.net/wiki/spaces/CLSL/pages/655988417)