syntax:

view :editor, <pattern>, :cacheable=>true do

  # some UI

end

 

view :editor, <pattern>

possible views:

      [ endless ]

 

needs acces to:

  • defining module
  • context
    • position on page (if necessary)
    • view of containing card (if applicable)
    • settings from transclusion syntax or params
    • render counts  (to prevent infinite render loops)
    • ...?  (this list is very rough)
  • renderer (object or method)
  • card being rendered
  • rails and Wagn helper methods

notes:

  • cacheability:

     a cacheable view depends only on the card data - name,type,content, etc.  and not on any other context

  • a view definition without a do block could be assumed to use the rails partial of the same name in the current module.