[Nitro] Placing tempaltes and includes outside of 'public' directory
George Moschovitis
george.moschovitis at gmail.com
Sun Apr 3 04:29:38 EDT 2005
Hello
> Is there some what to have a template file under /public, and have it
> include another file in a sibling directory?
>
> I have this directory tree
> ...
> <render href="/templates/header" />
in 0.14.0 you can do:
class MyController < Controller
@template_root = 'templates'
...
end
then in your html:
<render href="header" />
But I 'll change this so that your version works too. Please be patient.
> N::Runner.run( :host => '127.0.0.1',
> :port => 9999 ,
> :template_root => 'templates',
> :name => "Tagegory"
> )
If you set the templates root then you should just:
<render href="header" />
> On a related issue, if I simply put the header file in the same dir as
> index.xhtml, and use
> ...
> <render href="/common/header" />
As I said, will fix ASAP.
--
http://nitro.rubyforge.org
http://www.joy.gr
More information about the Nitro-general
mailing list