[Nitro] Nitro templating question
George Moschovitis
george.moschovitis at gmail.com
Mon Jan 9 12:30:36 EST 2006
> I have some questions regarding the Elements.
> I understand #{content :sidebar} use a child element, but I don't know
> where to set it up. Is there an accessor in the controller for it ?
<Page>
xxxx
<SideBar>
yyy
</SideBar>
</Page>
class SideBar
name :sidebar
def render
...
end
end
class Page
def render
%{
....
#{content} <---- xxxx
...
...
#{content :sidebar} <---- yyyyy
}
end
end
hope this helps...
> What is the difference between a Control and an Element ?
a control is used by the scaffolder, it is a visual representation of
a property.
It is a form element.
> How do you change the template surrounding a page without changin the
> enclosing tag ? eg. I use <Page> around my content, but sometimes I want
> a different html template. It there a mechanism for this ?
hmm I use different tags. But of course you can use a specialized
render method that renders multiple sorounding html according to some
conditions...
regards,
-g.
--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com
More information about the Nitro-general
mailing list