This site has moved to the integrated Appfire documentation and information site for our apps.
From February 2024 this site is no longer updated.
Take a look here! If you have any questions please email support@appfire.com
Examples - list macro
Example 1 Managing lists of pages and their labels using list macros
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 mammal
, oviparous
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 mammal
, oviparous
and pet
.
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 macro
list macro
One or more list-label
macros can be added to list
macro.
Each of these additional macros can be edited.
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.
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
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
bird
,fish
,mammal, amphibian
orreptile
.
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}
Example 3 Adding an editable comment column to your list
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).
Markup
list-wikiinput macro
We could use list-wikiinput
macro instead of the comment-heading to provide more detail over the columns (width
, rows
and cols
).