-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You should take another look at the documentation again, you must chain
every single route (or use tree-structure chaining, tho this is not
suitable for INI-configuration files). So both the route "plain" and
"announces" should have "abstract = true", then you must create two chains:

resources.router.routes.language-plain.type =
Zend_Controller_Router_Route_Chain
resources.router.routes.language-plain.chain = "language, plain"

resources.router.routes.language-announces.type =
Zend_Controller_Router_Route_Chain
resources.router.routes.language-announces.chain = "language, announces"
...................................
:  ___   _   ___ ___ ___ _ ___    :
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:........:........................:
: Web    : http://www.dasprids.de :
: E-mail : m...@dasprids.de       :
: Jabber : jab...@dasprids.de     :
: ICQ    : 105677955              :
:........:........................:


E-S schrieb:
> Hi,
> 
> Despite numerous searches and attempts without success, I request your help
> for setting up my applications routes.
> 
> My goal is to obtain routes like :language.domain.com/:controller/:action/*
> 
> and that it also works for this kind of routes:
> :language.domain.com/news/:news_id/news_title.html
> 
> It seems trivial but I don't get the point to make it work
> 
> I've set up a DomainAlias for each of the languages used and here's an
> extract of my actual application.ini :
> 
> resources.router.routes.language.type =
> "Zend_Controller_Router_Route_Hostname"
> resources.router.routes.language.route = ":language.domain.com"
> resources.router.routes.language.reqs.language= "^(fr|en|ja)$"
> resources.router.routes.language.defaults.language= "fr"
> 
> resources.router.routes.plain.type = "Zend_Controller_Router_Route"
> resources.router.routes.plain.abstract = "On"
> resources.router.routes.plain.route = "/:controller/:action"
> resources.router.routes.plain.defaults.controller = "index"
> resources.router.routes.plain.defaults.action = "index"
> 
> resources.router.routes.announces.type =
> "Zend_Controller_Router_Route_Regex"
> resources.router.routes.announces.route = "/announces/(\d+)/(.*).html$"
> resources.router.routes.announces.defaults.controller = "announces"
> resources.router.routes.announces.defaults.action = "read"
> resources.router.routes.announces.map.announce_id = 1
> 
> resources.router.routes.default.type = Zend_Controller_Router_Route_Chain
> resources.router.routes.default.chain = "language, plain, announces"
> 
> Trying differents variations the result is either the request is redirected
> to default/index/index with a correct language parameter or to the correct
> module/controller/action but the language parameter is lost.
> 
> Thanks in advance for any help.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpPa10ACgkQ0HfT5Ws789CLXwCfTT9HD+QZGNq99N4EqHjqEBuN
AUQAoJDrNkFMNHj76dpvpj5wWMbgpr55
=pxsH
-----END PGP SIGNATURE-----

Reply via email to