Ticket #304 (closed defect: fixed)
Pushing and popping target engine pages is gross, add an a_url_for helper
| Reported by: | boutell | Owned by: | boutell |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | apostrophePlugin | Version: | 1.0 |
| Keywords: | engines, routing | Cc: | agilbert |
| Symfony version: | 1.4 |
Description
We should add an a_url_for helper, as an optional alternative to regular url_for. It would grab the engine_page option if it sees it and do an implicit push and pop. link_to doesn't mind if your URL has already been url_for'd, so you could write link_to('foo', a_url_for('my/action', array('engine_page' => '/admin/media')))
No pushes to forget to pop that way.
This helper should call an aTools::genUrl method which becomes an alternative way to do the same thing from an actions class.
In Symfony 2.0 we need to approach all this with dependency injection and killt he static methods.

