# Jquery/jqmodal layout question

**URL:** <https://www.ruby-forum.com/t/jquery-jqmodal-layout-question/185206>\
**Category:** Rails\
**Created:** [March 16, 2010, 12:54am UTC](https://www.ruby-forum.com/t/jquery-jqmodal-layout-question/185206 "2010-03-16T00:54:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunaclaire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f4b2a3/32.png) [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Post date:** [March 16, 2010, 12:54am UTC](https://www.ruby-forum.com/t/jquery-jqmodal-layout-question/185206/1 "2010-03-16T00:54:05Z")

</div>

I trying jqmodal for popup dialogs and running into a problem.

jqmodal lets you specify a div containing content for the popup dialog  
and renders it for you. The dialog is hidden initially and then you  
use a show cmd in JS to reveal it.

I’m filling the content with a partial.

The prob I’m having is that I’m getting my general application layout  
rendered into the popup as well and I dont want that.

I thought I could do a conditional layout in my controller for the  
action corresponding to the content of the popup, but that doesnt seem  
to get hit and I always end up with the layout rendered.

I also thought I could do something like this:

\<%= render :partial =\> ‘partial’, :layout =\> ‘popup\_layout’ %\>

based on reading here (section called “Rendering partials with  
layouts”): [http://api.rubyonrails.org/classes/ActionView/Partials.html](http://api.rubyonrails.org/classes/ActionView/Partials.html)

but when I do that I get:

Missing template controller\_name/\_popup\_layout.erb in view path … In  
other words, it thinks the layout is the partial name.

Any ideas either specific to jqmodal or rendering partials with a  
particular layout?
