Sha256: f4531cac173199dacde7390bc3c2f17fdf8a6ecb133e097110bdafa1372c145b

Contents?: true

Size: 811 Bytes

Versions: 1

Compression:

Stored size: 811 Bytes

Contents

h1. About

This is a framework-agnostic template inheritance engine from Rango.

h1. Usage

<pre>
require "template-inheritance"

TemplateInheritance::Template.paths &lt;&lt; File.expand_path("..", __FILE__)

template = TemplateInheritance::Template.new("site/post.html.haml")
template.render(post: post)
</pre>

h2. In Padrino

<pre>
require "template-inheritance/adapters/padrino"

class Foo &amp; Padrino::Application
  register TemplateInheritance::Rendering
end
</pre>

Also if you are on Padrino Git HEAD or Padrino 0.9.29, you have to set @SKIP_PADRINO_RENDERING@ to @true@ _before Padrino is loaded_. It's because of a "bug in Padrino":https://github.com/padrino/padrino-framework/issues/541.

h1. Haml Extensions

<pre>
Tilt::HamlTemplate.options[:default_attributes] = {form: {method: "post"}}
</pre>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
template-inheritance-0.3.1 README.textile