add 'Agregando Tu Propio Motor de Renderizado' section to spanish readme
This commit is contained in:
parent
e85b0976c0
commit
56bb2fcc43
|
@ -657,6 +657,23 @@ las plantillas Textitle, podés hacer lo siguiente:
|
|||
|
||||
Tilt.register :tt, Tilt[:textile]
|
||||
|
||||
=== Agregando Tu Propio Motor de Renderizado
|
||||
|
||||
Primero, registrá tu motor con Tilt, y después, creá tu método de renderizado:
|
||||
|
||||
Tilt.register :mipg, MiMotorParaPlantillaGenial
|
||||
|
||||
helpers do
|
||||
def mypg(*args) render(:mypg, *args) end
|
||||
end
|
||||
|
||||
get '/' do
|
||||
mypg :index
|
||||
end
|
||||
|
||||
Renderiza <tt>./views/index.mypg</tt>. Mirá https://github.com/rtomayko/tilt
|
||||
para aprender más de Tilt.
|
||||
|
||||
== Ayudantes
|
||||
|
||||
Usá el método top-level <tt>helpers</tt> para definir métodos ayudantes que
|
||||
|
|
Loading…
Reference in New Issue