Kartesus asked:

something like rails partials

exist some nitro feature that works like rails partials?

i've tried the following: #{my_menu}

but the file my_menu.xhtml doesn't renders.

(1 attempts)

Fabian answered:

I don't know much about Rails, but in Nitro there are several ways for something like this: Elements, render, include..

What you probably want is rendering your my_menu.xhtml:

<render href="my_menu" />

Where "mymenu" is an action (without .xhtml). It renders the mymenu action and your my_menu.xhtml template.

Alternatively there's include, which doesn't render an action, only includes a given file:

<include href="my_menu.xhtml" />

Note: include takes the whole filename, so with .xhtml (or whatever you called the file).

Rating: 5