# Snippet hierarchy

**URL:** <https://www.ruby-forum.com/t/snippet-hierarchy/97593>\
**Category:** Radiant CMS\
**Created:** [July 8, 2006, 6:13pm UTC](https://www.ruby-forum.com/t/snippet-hierarchy/97593 "2006-07-08T18:13:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maurizio\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@Maurizio\_B](https://www.ruby-forum.com/u/Maurizio_B)\
**Post date:** [July 8, 2006, 6:13pm UTC](https://www.ruby-forum.com/t/snippet-hierarchy/97593/1 "2006-07-08T18:13:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Maurizio\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@Maurizio\_B](https://www.ruby-forum.com/u/Maurizio_B)\
**Post date:** [August 3, 2006, 2:24pm UTC](https://www.ruby-forum.com/t/snippet-hierarchy/97593/2 "2006-08-03T14:24:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Maurizio\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b3f665/32.png) [@Maurizio\_B](https://www.ruby-forum.com/u/Maurizio_B)\
**Post date:** [August 3, 2006, 2:24pm UTC](https://www.ruby-forum.com/t/snippet-hierarchy/97593/3 "2006-08-03T14:24:15Z")

</div>

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