Hi guys,
i was wondering if there is any possibility to render a layout on the
fly instead of putting it into the layouts/ folder. Any ideas?
Hi guys,
i was wondering if there is any possibility to render a layout on the
fly instead of putting it into the layouts/ folder. Any ideas?
Franz Bettag wrote:
Hi guys,
i was wondering if there is any possibility to render a layout on the
fly instead of putting it into the layouts/ folder. Any ideas?
Not sure what you mean. Layouts are rendered just like any rhtml file.
Alex W. wrote:
Franz Bettag wrote:
Hi guys,
i was wondering if there is any possibility to render a layout on the
fly instead of putting it into the layouts/ folder. Any ideas?Not sure what you mean. Layouts are rendered just like any rhtml file.
Yeah but normal .rhtml files have to be in the layouts folder. I want to
load the layout from another website everytime the shop gets called. So
not store them locally. I know this i quite bw consuming on sites with
many hits but my customer want’s it that way
Franz Bettag wrote:
Alex W. wrote:
Franz Bettag wrote:
Hi guys,
i was wondering if there is any possibility to render a layout on the
fly instead of putting it into the layouts/ folder. Any ideas?Not sure what you mean. Layouts are rendered just like any rhtml file.
Yeah but normal .rhtml files have to be in the layouts folder. I want to
load the layout from another website everytime the shop gets called. So
not store them locally. I know this i quite bw consuming on sites with
many hits but my customer want’s it that way
I took a look at the Rails API and found these examples:
render :file => “/path/to/some/template.rhtml”
render :file => “c:/path/to/some/template.rhtml”
code
render :file => “/path/to/some/template.rhtml”, :layout => true,
:status => 404
render :file => “c:/path/to/some/template.rhtml”, :layout => true,
:status => 404
proper file extension
render :file => “some/template”, :use_full_path => true
and
[TEMPLATE_ROOT]/weblog/show.r(html|xml) (in Rails,
app/views/weblog/show.rhtml)
render :template => “weblog/show”
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs