Top
Zend framework 2 generating route url with domain name – Dragos Cirjan
fade
713
post-template-default,single,single-post,postid-713,single-format-standard,eltd-core-1.1.1,flow child-child-ver-1.0.0,flow-ver-1.3.6,,eltd-smooth-page-transitions,ajax,eltd-blog-installed,page-template-blog-standard,eltd-header-standard,eltd-fixed-on-scroll,eltd-default-mobile-header,eltd-sticky-up-mobile-header,eltd-dropdown-default,wpb-js-composer js-comp-ver-5.0.1,vc_responsive

Warning: A non-numeric value encountered in /usr/src/wordpress/wp-content/themes/flow/framework/modules/title/title-functions.php on line 417

Zend framework 2 generating route url with domain name

Zend framework 2 generating route url with domain name

Nothing more than this little line of code:

$homeUrl = $this->url(
    'youRouteName',
    array(/* your route params */),
    array('force_canonical' => true)
);

Of course, you need to call it within a code zone where you can invoke the URL helper. What you see above, assumes that you are in a .phtml file invoked by a controller’s action.

Cirjan Dragos
No Comments

Post a Comment