# Include templates in eruby?

**URL:** <https://rubytalk.org/t/include-templates-in-eruby/9205>\
**Category:** ruby-talk\
**Created:** [5 December 2003 10:44 UTC](https://rubytalk.org/t/include-templates-in-eruby/9205 "2003-12-05T10:44:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carsten\_Eckelmann](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@Carsten\_Eckelmann](https://rubytalk.org/u/Carsten_Eckelmann)\
**Post date:** [5 December 2003 10:44 UTC](https://rubytalk.org/t/include-templates-in-eruby/9205/1 "2003-12-05T10:44:03Z")

</div>

Hi,

from the very terse documentation of eruby I couldn’t find anything like  
\<% include “header.rhtml” %\> to include (and execute) another template  
in the active one. How can you live without this feature?

Cheers,  
Carsten.

---

<div class="post-metadata">

**Author:** ![Kaspar\_Schiess](https://avatars.discourse-cdn.com/v4/letter/k/d78d45/32.png) [@Kaspar\_Schiess](https://rubytalk.org/u/Kaspar_Schiess)\
**Post date:** [5 December 2003 10:52 UTC](https://rubytalk.org/t/include-templates-in-eruby/9205/2 "2003-12-05T10:52:45Z")

</div>

> from the very terse documentation of eruby I couldn’t find anything like  
> \<% include “header.rhtml” %\> to include (and execute) another template  
> in the active one. How can you live without this feature?  
> How about  
> ERuby.import(“foo.rhtml”)

I think this solves your troubles. From the examples subdirectory in the  
distribution.

kaspar
