Hi Jack, You could include a generic edit and show action that processes the "template" request parameter and forwards to the corresponding action. Obviously this action can be called by the generic route
/:module/:action/:template If you use this functionality in multiple modules, you can even extract the functionality into a common base class like myActions. Bernhard On Wed, Nov 5, 2008 at 8:32 PM, Jack Bates <[EMAIL PROTECTED]> wrote: > > In the project I contribute to (http://qubit-toolkit.org/wiki/ > index.php?title=Main_Page) we have a list of many symfony actions: > > * editIsad > * editRad > * editDc > [...] > * showIsad > * showRad > * showDc > [...] > > The actions correspond to different metadata standards. Our URLs are > of the form: "/:module/:action/:template", e.g. "/informationObject/ > edit/isad" > > My challenge now, is routing URLs of this form, where the action name > does not actually appear in the URL, to the correct action, for all > our defined actions. > > Currently in our routing.yml, I have: > > edt/isad: > url: /:module/edit/isad > param: { action: editIsad } > > edit/rad: > url: /:module/edit/rad > param: { action: editRad } > > [...] > > The problem is that, as the list of supported metadata standards > grows, it is hard to keep our routing.yml consistent with our list of > defined actions. > > How can I configure the routing system to forward URLs like "/ > informationObject/edit/foo" to the "editFoo" action, without listing > all the actions in routing.yml? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
