Module Nanoc3::Helpers::Rendering
In: lib/nanoc3/helpers/rendering.rb

Provides functionality for rendering layouts as partials.

Methods

render  

Included Modules

Nanoc3::Helpers::Capturing

Public Instance methods

Returns a string containing the rendered given layout.

@param [String] identifier The identifier of the layout that should be rendered

@param [Hash] other_assigns A hash containing assigns that will be made available as instance variables in the partial

@example Rendering a head and a foot partial around some text

  <%= render 'head' %> - MIDDLE - <%= render 'foot' %>
  # => "HEAD - MIDDLE - FOOT"

@example Rendering a head partial with a custom title

  # The 'head' layout
  <h1><%= @title %></h1>

  # The item/layout where the partial is rendered
  <%= render 'head', :title => 'Foo' %>
  # => "<h1>Foo</h1>"

@raise [Nanoc3::Errors::UnknownLayout] if the given layout does not exist

@return [String] The rendered partial

[Validate]