expand_less
Wagn supports formatting with [[rules]] (configurations that can apply to any [[set]] of cards).
[[*structure]] rules control cards' type and content. Like all [[rules]], [[*structure]] rules apply to a specific [[Set]] of cards. Changing a [[*structure]] rule will impact every card in the rule's [[Set]].
[[rules+howto]].
Naming patterns via nests
Consider again our example of the recipe form card:
{{Recipe+*type+*structure|closed}}
Looking at that card, you'll notice lots of [[nesting]], like {{+ingredients|open}}. Here's a brief overview of how this works:
The double curly brackets (\{{) represent an [[nesting]], meaning that one card is inside another. In this case, the ingredients card is inside the recipe card.
The "+" before "ingredients" indicates that this is a [[contextual name]], meaning that the included card receives a name relative to the including card. For example, if I make a recipe called "Lobster Bisque", then its ingredient list will be named "Lobster Bisque+ingredients".
The "open" refers to the [[views]] of the included card. When you see the ingredients card inside the recipe, it will be open.
The important pattern to understand is that these structured inclusions establish naming patterns. All the cards that contain information about ingredients will have names that begin with the recipe name and end with "+ingredients". These naming patterns are key to Wagn's organizational capabilities.
Fields on structured cards
Typically when we create structured cards, we treat the included cards as "fields". And we often want to set the default type and/or content for those fields. Setting up field types can be done by using the capabilities outlined above in combination.
For example, when viewing the Recipe structure rule included above, you can click on any inclusion to open up its rules. If you click on +diet, you will see that its [[*default]] rule determines that any +diet card will, by default, have the type [[Pointer]] and the content "conventional".
See also
[[nesting]]
[[compound names]]
[[contextual names]]
[[views]]
[[virtual cards]]
[[*structure]] rules control cards' type and content. Like all [[rules]], [[*structure]] rules apply to a specific [[Set]] of cards. Changing a [[*structure]] rule will impact every card in the rule's [[Set]].
[[rules+howto]].
Naming patterns via nests
Consider again our example of the recipe form card:
{{Recipe+*type+*structure|closed}}
Looking at that card, you'll notice lots of [[nesting]], like {{+ingredients|open}}. Here's a brief overview of how this works:
The double curly brackets (\{{) represent an [[nesting]], meaning that one card is inside another. In this case, the ingredients card is inside the recipe card.
The "+" before "ingredients" indicates that this is a [[contextual name]], meaning that the included card receives a name relative to the including card. For example, if I make a recipe called "Lobster Bisque", then its ingredient list will be named "Lobster Bisque+ingredients".
The "open" refers to the [[views]] of the included card. When you see the ingredients card inside the recipe, it will be open.
The important pattern to understand is that these structured inclusions establish naming patterns. All the cards that contain information about ingredients will have names that begin with the recipe name and end with "+ingredients". These naming patterns are key to Wagn's organizational capabilities.
Fields on structured cards
Typically when we create structured cards, we treat the included cards as "fields". And we often want to set the default type and/or content for those fields. Setting up field types can be done by using the capabilities outlined above in combination.
For example, when viewing the Recipe structure rule included above, you can click on any inclusion to open up its rules. If you click on +diet, you will see that its [[*default]] rule determines that any +diet card will, by default, have the type [[Pointer]] and the content "conventional".
See also
[[nesting]]
[[compound names]]
[[contextual names]]
[[views]]
[[virtual cards]]