tags:

views:

310

answers:

1

At the moment you can use arguments in you view path, for example user/%/friends where % is an argument (user's ID). But is it possible to use an argument in different way, let's say user-%/friends, so the normal path would look like user-123/friends instead of user/123/friends?

Thank you.

+1  A: 

no, you can't use arguments like that directly. however you can provide default arguments using php. when writing you can use arg(0) for the first argument in path (say a site.com/user/123/dashboard would return 'user' for arg(0) and 123 for arg(1) etc). i guess you can just use php to parse the path for the argument you want, through regular expressions and string functions.

barraponto