Hi, I understand that the layout concept is very similar to OpenSymphony's Sitemesh project. I have done a lot of development with Sitemesh, but am fairly new to Rails. I am wondering if there is a way for a layout in rails to find out value of a variable from a page it is decorating? In sitemesh you would be able to do <meta name="show_menu" content="true"> on some page being decorated and then in the layout page, you can access the value of show_menu using page.getProperty(..) and can show or hide the menu. Is there a way to do something like the above in Rails? For example a template t1.rhtml could be: <div> Some content <!-- can I set a variable show_menu here --> </div> And this is the layout1.rhtml (layout file that t1 gets decorated with): <html> <head></head> <body> <!-- can I use the variable show_menu here that might be defined in the template this file is decorating --> <div id='menu'></div> <div id='main'> <%=@content_for_layout%> </div> </body> </html> Is this possible in rails? If yes, how? Thanks, Mufaddal.
on 2006-03-31 23:47