Sign up Sign in Samples Blog contact support
views

Wagn's flexibility in displaying data comes from organizing views of cards. Views are most often applied via inclusions and are especially useful in formatting.  Views can also be specified in the RESTful Web API or in WQL.

 
+example

Here is the Apple card in open view:

Apple
You can count how many seeds are in an apple, but you can't count how many apples are in a seed.

...and here it is in titled view:

Apple
You can count how many seeds are in an apple, but you can't count how many apples are in a seed.

...and in change view:

Apple edited over 3 years ago by Ethan McCutchen

...and in content view:

You can count how many seeds are in an apple, but you can't count how many apples are in a seed.

 
+howto

Click on any view name below to link to a page of the Apple card showing that view.

 

Dynamic content views

The following views can be edited in place:

  • content  — just the card content
  • titled — card title followed by content
  • open — full card header and content
  • closed — one-liner with card header and trimmed content
  • labeled — card title followed by what content will fit on a single line
  • change — who last edited each card and when

Static content views 

These views have no HTML wrapping (ie no "slots") and therefore can't be interacted with dynamically:

  • core — processed card content
  • raw — unprocessed card content, including markup and unescaped HTML

Name Views

These short views are most useful when used in displaying items in a list (collection):

  • name — the card's name
  • link — a link to the card (also see Link Syntax)
  • linkname — url-friendly name variant (eg underscores instead of spaces)
  • url —full, canonical URL for the card

 

Using Views

See the following pages to learn how to use views in these contexts:

  1. Inclusion (Inclusion Syntax)
  2. RESTful Web API
  3. WQL

 

+tips
  • several elements of views - such as the menu - can be added or removed with show or hide. See Inclusion Syntax.
  • views are also central to the Wagn module api, which makes it easy to create new views for specific sets.
  • The name and linkname views are especially useful for contextual web addresses.
  • views can also be added to the end of any URL to override the default view. See web address for everything.

 

+discussion

Also see Design Braindumps+views


The default views for inclusions and items in Searches/Pointers will be changing. See change default inclusion view to titled and search&pointer items to link

  --John Abbe.....2013-03-22 23:16:08 +0000


Looks you like removed all of the tips about show/hide - is that documentation somewhere else now?

--John Abbe.....2013-09-12 16:55:34 +0000