Snippet hierarchy

Working on mostly multi-lingual web sites, I’m finding it would be
very useful to be able to organize snippets in a hierarchical way as
we do for pages. For example every time I need a navigation menu
snippet, I need to have it separated for the English language and the
Italian one. The same goes for footers, headers, etc. At the time
being I’m simply naming them like: “header_it”, “header_en”, etc. But
when you have more languages, and/or several design layouts for the
same site (which therefore requires to maintain multiple headers,
footers, etc.: e.g. “header_reboot_it”, “header_reboot_en”, where
“reboot” is a different layout which requires a different snippet
content) it could quickly become difficult to deal with a fairly long
sequential list of snippets. --M

I agree, I’ve got a site with about 30 snippets (on an English only
site) and some way to organize them would be greatly appreciated.

And reference them in a way similar to this:
<r:snippet path=“en” name=“header” />

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs