Question

How can i setup a route that points to URL of a partner website?

Example:

<a href="<?php echo $this->url(array(), 'superPartnerRoute'); ?>">Try this ultra fab partner website</a>

Reason for this; the URL is quite complicated and used around the website i'm working on.

http://slippery.slick.domain.com/very/long/url/index.asp?view=23457

If this URL - for some reason - changes i need to change the url around the website.

I could just add it to the language file, but i would like to keep things separated.

So superPartnerRoute should point to http://slippery.slick.domain.com/very/long/url/index.asp?view=23457

Was it helpful?

Solution 2

Sometimes i should just try things out before asking ;-)

Just added this to my routes.ini

resources.router.routes.superPartnerRoute.type = "Zend_Controller_Router_Route_Static"
resources.router.routes.superPartnerRoute.route = "http://slippery.slick.domain.com/very/long/url/index.asp?view=23457"

Works like a charm!

OTHER TIPS

You could just use a Hostname-Route which you chain together with a path route.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top