[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Announce] New web site made with nearly pure lua: NetPIM.info
- From: DarkGod <darkgod@...>
- Date: Tue, 19 Aug 2008 19:30:05 +0200
> The current Cosmo has arguments for applications, so you can have those:
>
> $include{ "html/shared/foo.lua.tpl" }, just define an include function in
> the template's environment
>
> $set{ "foo", "whatever" }, again, define a set function, or even $foo{
> "whatever" }, and patch the environment's __newindex to set foo.
>
> $config|settings|foo|bar|baz will get env.config.settings.foo.bar.baz, where
> env is your template's environment. Again, you can make it shorter with
> something like $cfg|foo|bar|baz, by putting cfg in your environment as an
> alias to config.settings.
Ohh that sounds nice.
Actually this is all I wanted, and more :)
PS: Sorry for the subject change, I've reverted it