Hi everyone, again with problems with the router here, I have this rule in 
routes_in, and is working pefectly:

('/$lang/$country/$state/$city(?P<any>.*)', 
'/{app}/city/view\g<any>?lang=$lang&country=$country&state=$state&city=$city'.format(app=app))

This maps the url and I can use the language, the country, the city and the 
state as variables in my controller, the problem is with the routes_out:

( 
'/{app}/city/view(?P<any>.*)?lang=$lang&country=$country&state=$state&city=$city'.format(app=app),
 
'/$lang/$country/$state/$city\g<any>')

Always that I put something like ?lang=lang in routes_out it breaks, gives 
no error, but the rule don't work.

I am having other problem, and is with the url vars position, web2py uses a 
dictionary in some step and don't keep the url vars order (even if I use a 
orderedDict in the URL() vars argument). I have used the Yii2 framework 
router and it don't care about the url vars order. We have, or can we have 
something similar with web2py?

Greetings.


El jueves, 7 de julio de 2016, 8:50:46 (UTC-4), Carlos Cesar Caballero 
escribió:
>
> Hi, I need some starting point to implement the URL based 
> internationalization using the pattern based router, I really need to use 
> the router, but there is so little documentation...
>
> I am clonning our yii2 cms base application (supporting right now sites 
> like http://santiagohermes.com http://anniaalonso.com, 
> http://alborarquitectos.com and http://casamabehostal.com) and it is 
> almost done (you can look working in http://daxslab.com/) but I need to 
> add some functionalities with the router before sharing it to everyone.
>
> Greetings.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to