MonoRail – rendering partials

by benl

You can achieve the equivalent of RoR’s partial support in MonoRail via the following:

  • Place your partial template (.vm) in the views/shared folder
  • Call #parse(“shared/yourpartial.vm”) wherever you want to render the partial content

Note: this above example only applies to the NVelocity view engine.

Simple really!

Ninja EditAyende has pointed out the Brail alternative:

  • OutputSubView(”/shared/yourpartial”)