[Nitro] Placing tempaltes and includes outside of 'public' directory

James Britt james_b at neurogami.com
Sat Apr 2 23:54:37 EST 2005


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

/conf
/public
/log
/templates

my index.xhtml  file has

    <render href="/templates/header" />

so it can slurp in header.xhtml

but it fails.

I've also tried

    <render href="templates/header" />

My run.rb (this is running under WEBrick)  has

N::Runner.run( :host => '127.0.0.1',
                :port => 9999 ,
                :template_root => 'templates',
                :name => "Tagegory"
               )

which I though would tell Nitro to look in templates/ for files.

On a related issue, if I simply put the header file in the same dir as 
index.xhtml, and use

    <render href="header" />

then it works.  If I try to put the header file is a subdirectory of 
public, and use this

    <render href="/common/header" />

I get errors about no such action.



Thanks,

James
-- 

http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com



More information about the Nitro-general mailing list