Am 30.03.2016 um 09:28 schrieb can:

Hi Sönke,

Thanks for reply. This works, but I need to send each rendering method. This is not good. What can I do?

What I usually do is to use some form of inheritance:

class ViewData {
     string ver;
}

class FooViewData : ViewData {
     int foo;
}

class BarViewData : ViewData {
     int bar;
}

class Service {
     void getFoo()
     {
         scope info = new FooViewData;
         render!("foo.dt", info);
     }

     void getBar()
     {
         scope info = new BarViewData;
         render!("bar.dt", info);
     }
}

That way you'll still have to pass something for every render(), but
the general arguments are decoupled from the page specific ones.