On Mon, 30 Sep 2013, Alexis Sukrieh wrote:
2013/9/29 Henk van Oers <[email protected]>
I do. I have a hook:
hook before_template => sub {
my $tokens = shift;
$tokens->{prefix} = prefix;
};
Hmm, should't it be better to use [% request.uri_base %] ?
No. I mean the part behind the base and before the route: the prefix.
In App:
load_app 'Subapp', prefix => '/foo';
In Subapp:
get '/bar' => sub { template 'bar'; };
In bar.tt
<a href="[%prefix%]/baz">Baz</a>
to get a link to Subaps /baz route from whatever prefix is set to.
HTH
Regards,
Henk
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users