"ASP" vars in layouts

May 24, 2010 at 12:06 PM
Using v1.1 of C# Webserver and the Tiny template generator, is it possible to populate variables that can be shown by the layout template? I'd like to do something like: <html> <body id="<%= i.myPageName %>"> <%= text %> </body> </html>
Jun 22, 2010 at 5:08 AM
Edited Jun 22, 2010 at 5:10 AM

All vars used in the page template should automatically be available in the layout template.

They are assigned by the ViewController: http://webserver.codeplex.com/SourceControl/changeset/view/45005#602015

Check the RenderTemplate method.

Jun 30, 2010 at 1:16 PM

The problem is that the Layout template is rendered by RenderLayout() which doesn't have access to the user data.


I would recommend rewriting ViewController.RenderAction() and RenderLayout() so that the params are passed.