# How to add pass route param to url view helper?

**URL:** <https://discourse.laminas.dev/t/how-to-add-pass-route-param-to-url-view-helper/457>\
**Category:** Components & MVC\
**Tags:** zend-mvc, zend-view\
**Created:** [February 1, 2018, 11:02am UTC](https://discourse.laminas.dev/t/how-to-add-pass-route-param-to-url-view-helper/457 "2018-02-01T11:02:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![djmentos](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@djmentos](https://discourse.laminas.dev/u/djmentos)\
**Post date:** [February 1, 2018, 11:02am UTC](https://discourse.laminas.dev/t/how-to-add-pass-route-param-to-url-view-helper/457/1 "2018-02-01T11:02:32Z")

</div>

I’ve created routing based on Hostname but reached trouble with URL generation when using \Zend\View\Helper\Url.

When I run:

`$this->url('main/faq')`

helper creates URL without lang param in subdomain. Ok, I can use:

`$this->url('main/faq', [], [], true)`

and then lang param is attached to subdomain, but this call makes a lot of mess (as it keeps other parameters that needed no more).

Is there any solution to attach lang param to subdomain without setting $reuseMatchedParams? Or to use it without mess?
