Layout rules allow you to choose a layout for any set of cards.  And with a little knowledge of HTML and nesting, you can easily create your own layouts.

 
 

A *layout rule works like any other rule (see the rules documentation to learn about navigating to and editing rules).

Here is the layout card currently in use on decko.org

view (editor) not supported for decko org layout 2

Notice how the layout uses standard Nest Syntax.   These nest work just like any normal nest .

For a layout to function correctly, it must have this nest:

  • {{_main}} -- this "contextual name" determines where the main card goes.  For example, if you go to a card named "Hot Dog", then the Hot Dog card will appear where this nest shows up in the layout.   Without this nest, every card with this layout will look the same.

 

  1. If you manage to break your deck while messing around with layouts, try adding ?layout=blank to the end of your url.  This will give you access to a functioning, built-in layout
  2. This trick is often most useful in combination with a custom view (eg "edit_inline").
  3. Similarly, you can test layouts before using them by adding "?layout=[layout name]" at the end of most URLs.

 

Hey Guys! I'm excited about the new layouts infrastructure!

 

Simple. Elegant. Flexible. Just like wagneering. Well Done! I look forward to playing with it more.


This is amazing! I am so glad to find this. I was considering Semantic MediaWiki for a project, but the ease and grace of Wagn is superb, as with this custom layout feature. Well done! Excellent crafting!

  --Patrick (Not signed in).....Sun Oct 25 14:58:07 -0700 2009


Great job. Getting very close to the 'Everything-is-a-Card' meme.

  --WG (Not signed in).....Mon Oct 26 08:52:55 -0700 2009


Layouts now work with any set, not just *all.

  --John Abbe.....Tue Apr 27 02:24:59 -0700 2010


The list (in +examples) of "all" layouts isn't complete, and I can't think of a way to get all layouts, since some (e.g. mobile) aren't referred to by a +*layout card. Ideas?

  --John Abbe.....Thu Jan 27 16:34:09 -0800 2011