Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel2
minLevel2
indent0px
separatorpipe


list
Anchor
checklist
checklist

Code Block
titlemacro
{list}


Excerpt
hiddentrue

Managing lists of pages and their labels


On this page

Table of Contents
maxLevel3
minLevel3
excludechecklist

Example 1 Managing lists of pages and their labels using list macros
Anchor
Example 1
Example 1

list macro

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. 


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


Add  mammaloviparous and pet as List Labels using the Edit 'List' Macro box.


All the children of Animal Farm in Alpha Centauri are shown.  The checks are for the labels mammaloviparous and pet.


Whenever 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 macro

list macro

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


Each of these additional macros can be edited.


These 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.


Code Block
titleMarkup
{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
Anchor
Example 2
Example 2

list-excerpt macro

list 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 birdfishmammal, amphibian or reptile.


Code Block
titleMarkup
{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}

Example 3 Adding an editable comment column to your list
Anchor
Example 3
Example 3

Add a comment heading column to a list

Let's restrict to show 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 heading "Classification".

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



The list has been named Pets


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).

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


list-wikiinput macro

We could use list-wikiinput macro instead of the comment-heading to provide more detail over the columns (widthrows and cols).