Octavian Râsnita wrote:
> No I don't generate templates dynamicly, but if I put just simple html code
> in the database I would also need to hard-code the links, and in that case
> they will be harder to modify in case I would need to modify the
> application.
>
> For example now the web app runs on the root url (/) but in the future I
> might need to put it run on a sub-virtual-directory like /something/.
>
> If I define the urls using [% c.uri_for('/test') %]
>
> this URL will become http://www.mysite.ro/test
>
> but in the future if I would put the app to run on /something/, it will
> automaticly become
> http://www.mysite.ro/something/test
> without changing anything.
That looks like Catalyst. Note that you can use
$c->uri_for_action('/internal/action/path', ...);
to create an URL by name of the action instead of specifying the public
address. This has the advantage that the links will simply work if you
change any part of the public address (base, but also the public paths
of the actions).
--
Robert 'phaylon' Sedlacek
Perl 5 Consultant for
Shadowcat Systems Limited - http://shadowcat.co.uk/
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates