Dynamic Layout Template

I want to make the layout template dynamic. The value of the layout template would be fetch in the server using a Meteor.call ‘getLayoutTemplate’. Where shall I put the Meteor.call? And it should wait until it fetches the value of the Meteor.call. Any ideas?

Router.configure
  layoutTemplate: ????
  notFoundTemplate: 'notFound'

an onBeforeAction can be used for waiting the result and setting it to a session variable and the layout template can take that session variable as input, and return a loading template in lack thereof.

If you go the Session way you might need to wrap the Router.configure inside a Tracker.autorun.