# Layouts for RJS templates?

**URL:** <https://www.ruby-forum.com/t/layouts-for-rjs-templates/92413>\
**Category:** Rails\
**Created:** [April 19, 2007, 9:14am UTC](https://www.ruby-forum.com/t/layouts-for-rjs-templates/92413 "2007-04-19T09:14:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjohnson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3ec8ea/32.png) [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Post date:** [April 19, 2007, 9:14am UTC](https://www.ruby-forum.com/t/layouts-for-rjs-templates/92413/1 "2007-04-19T09:14:08Z")

</div>

Is it possible to have layouts for RJS templates?

The reason I ask is because I have code in my rjs templates the does the  
same thing as flash. If there are alerts in the flash hash then I  
display them by adding the html via javascript. I don’t want to include  
this code in every rjs file. Which is why a layout would be nice.

Is this possible?

Thanks!
