snipsnap-help says of the {label-search} macro,
| Macro | Description | Parameters |
|---|
| label-search | type: Lister to render found snips (AtoZ, Vertical, Simple) name: Name of a Label to search for value: Value of the label too look for | Show all snips that have a certain label. |
You need to provide the named parameters
name and
value describing the label you want to search for snips with. The parameter
type defines the ListFormatter used to format the result, like Vertical, Simple, AtoZ.
One way to find out what values you need to give for
name and
value; visit a snip that has the label you want to search for, and follow the [add label] link. A table on the first [add label] page lists the
name and
value for all the snip's existing labels.
Example
Give some snips a label, for example a Category label
Customers. Now, use the label-search macro to retrive these...
{label-search:type=Vertical|name=Category|value=Customers}Note that if you don't have the option to give snips the label
Customers, you can add the option like this:
- Create a new snip called Customers
- Add a 'TypeLabel' to the snip and choose the 'Category' type
- Customers should now be in the list of categories when you add a CategoryLabel
Adding a {label-search} like the example above to your new
Customers snip would now be a cunning plan.