Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Template inheritance for non Rango frameworks

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.textile

About

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

Usage

require "template-inheritance"

TemplateInheritance::Template.paths << File.expand_path("..", __FILE__)

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

In Padrino

require "template-inheritance/adapters/padrino"

class Foo & Padrino::Application
  register TemplateInheritance::Rendering
end

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.

Haml Extensions

Tilt::HamlTemplate.options[:default_attributes] = {form: {method: "post"}}
Something went wrong with that request. Please try again.