twigphp / Twig

Twig, the flexible, fast, and secure template language for PHP
https://twig.symfony.com/
BSD 3-Clause "New" or "Revised" License
8.15k stars 1.25k forks source link

Reusing applications makes redirects awkward #334

Closed awildeep closed 13 years ago

awildeep commented 13 years ago

If I make an application and mount it to another application with a prefix, any self referencing redirects used get wonky.

For example: https://gist.github.com/984253

I understand the reason this fails as redirects do not care about the application context.

However if reusable applications are a goal of Silex I think being able to handle redirects in a way that could allow them to be modified would be ideal. Perhaps maybe we could have a method of redirection to a named route (this does not allow for variable passing however)?

Thoughts? Or am I missing something REALLY obvious?

awildeep commented 13 years ago

The example I made is VERY simple implementation and not a good use of the framework but I wanted to demonstrate the awkwardness as simply as possible.

awildeep commented 13 years ago

(Sorry about closing this, clicked the wrong button)

stloyd commented 13 years ago

You should open this issue in Silex repo not in Twig one or I'm missing some relations ?

igorw commented 13 years ago

Yep, please open an issue on the Silex repo. Then I'll be glad to share my comments.

awildeep commented 13 years ago

Wow I must have been really tired last night. Sorry about this guys. :(