> Here is a gist with some excerpts:
> http://gist.github.com/218838
> In this example, sometimes I want to show a subnavigation and
> sometimes I don't. In the layout I check for the existence of the
> @sub_nav variable. If it is present then I output the requisite html.
> In the page file I assign a partial to the @sub_nav variable. This
> lets me easily assign blocks of html to a variable.
> You could also just use a ture/false approach, i.e. @sub_nav = true,
> and then in the layout:
> if @sub_nav == true do
> #subnav
> Does that help?
> Greg
> On Oct 26, 11:13 am, JoeE <joeegan1...@googlemail.com> wrote:
> > Cool - I'm not too ruby savvy - could you provide an example?
> > Thanks,
> > Joe
> > On 26 Oct, 14:23, Greg DeVore <greg.dev...@gmail.com> wrote:
> > > You can already do this. Just set an instance variable in the src
> > > file. You can add logic in the layout to handle it accordingly. I do
> > > this to emulate the content_for functionality of rails all the time in
> > > my staticmatic sites.
> > > Greg
> > > On Oct 26, 8:58 am, JoeE <joeegan1...@googlemail.com> wrote:
> > > > I think this would be a powerful feature to add, even though it would
> > > > not exactly add any functionality - it would save gluing a load of
> > > > partials together allowing users' code to be more linear.