You need to set the base url manually FIRST before you can get it
as in this:
$app->hook('slim.before', function () use ($app) {
$app->view()->appendData(array('baseUrl' => '/base/url/here'));
});
http://help.slimframework.com/discussions/questions/49-how-to-deal-with-base-path-and-different-routes