# * George Moschovitis # (c) 2004-2005 Navel, all rights reserved. # $Id$ # A simple templating system. This demonstrates how # easily you can replace the XSLT templating system # with a custom implementation. Please note, that # this templating system is considerably less # efficient than XSLT. Moreover, not all features of # the XSLT template are ported. module BlogTemplate def s_head %{ #{@context.conf.name} } end def e_head %{ } end def t_head s_head + e_head end def t_header %{ } end def t_footer %{ } end def t_rendering_errors if @rendering_errors and (!@rendering_errors.empty?) %{

RENDERING ERRORS:

#{@rendering_errors.join('
')}
} end end def s_page %{ #{t_head}
#{t_header}
} end def e_page %{

About

This is a simple blog powered by Nitro Web Engine. Have a look at the source code and enjoy the power of Ruby. } + unless session['owner'] then %{

Login as owner.

} else %{

Logout.

} end + %{

Linkage



powered by:


skin from Blogger.com

.
#{t_footer}
#{t_rendering_errors} } end end