A lot of Wagn's flexibility hinges on putting everything into cards, and then offering a wide variety of views of those cards. Views are most often applied via inclusions or WQL, and are especially useful in formatting.
Examples
- content (default for inclusions) — shows the content of the card, without the surrounding card interface
- titled — content view, but after a header of the card's name
- open / closed — both show the content inside the surrounding card interface. Closed is the default for items in Searches and Pointers)
- link — instead of the card content, this just shows a link to the card, very much like using double square brackets for linking
- name — instead of the card content, this just shows the card's name
- linkname — like name, but puts in underscores instead of spaces (helpful when using inclusions to build URLs)
- url — shows the full, canonical URL for the card
- change — only applies to items in Searches and Pointers, showing who last edited each card and when. This is the view used on Recent.
- naked — shows the card without any enclosing HTML.
- raw — shows the unprocessed actual content of the card, complete with Wagn markup. Note that any HTML in the card will still be interpreted by your browser. Raw view is also naked.
How To
The view of an included card is specified after a vertical bar after the card's name, e.g.: {{Wiki on Wheels|view:open}} (you can also skip the "view:", i.e. {{Wiki on Wheels|open}}).
When including a Search or Pointer, you can also specify the view for each item (card) in the returned list, e.g., {{User+*type cards|item:link}}
In WQL syntax, item views are applied with WQL's usual key/value syntax, e.g.: {"type":"User", "view":"link"}
In special web addresses, you append views after a normal web address with "?view=" or "?item=", e.g. http://wagn.org/wagn/Fruit?view=closed or http://www.wagn.org/wagn/Image+*type+by_update?item=change
Tips
- The name and linkname views are especially useful for contextual web addresses.
- Some views are also available in special web addresses.
Also see Design Braindumps+views


