This project is read-only.

"ASP" vars in layouts

May 24, 2010 at 1: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 6:08 AM
Edited Jun 22, 2010 at 6:10 AM

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

They are assigned by the ViewController:

Check the RenderTemplate method.

Jun 30, 2010 at 2: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.