Skip to content

shortcut url (controller::action) to extend #501

Closed
hans-d opened this Issue May 28, 2012 · 3 comments

2 participants

@hans-d
hans-d commented May 28, 2012

For writing URLs, the shortcut controller::action can be used. However, if needing to set the controller array('action' => 'action') msut be used. Would be great if this could be written as *::action.

And if we are extending the shortcut format, why not allow for controller::action::id1, equivalent to `array('controller::action','args' => id1)?

Currently I haven't had time to investigate where this might be updated. If anyone can give me a pointer, I might try to get a PR for this.

@nateabele
Union of RAD member

For the first part, I really don't see the use case. For the second, the overhead of the extra parsing, combined with the lack of flexibility (i.e. I use id way more than I use args) doesn't make for a great feature. Don't worry though, we'll be rolling out ways of generating URLs more easily in the near future.

@hans-d
hans-d commented May 28, 2012

The use cdase would be more in views files being developed by less-php minded people, combined that the controller name may not always be vissible / directly deriveable from the url.. That way making a link to *::action would be easier as action => 'action'.

For named argumens there could be something like controller::action::namedarg1:value::namedarg2:value.

But perhpas you can already sketch some of the ideas re URL generating?

@nateabele
Union of RAD member

Yeah, the shortcuts we adopt will be based on method calls, not string parsing. Don't worry, we'll roll it out soon. :-)

@nateabele nateabele closed this May 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.