createUrl to current route?

(Thomas Jensen) #1


How do i make a link to the current page?

I’ve tried


, but it doesn’t take params with it and


seems kind of ugly?


(Antonio) #2

Maybe this helps you:

(Thomas Jensen) #3

Not really… :(

(Maschingan) #4


(Thomas Jensen) #5

Will it obey the url rules and add params?

(Matteo Falsitta) #6

I use without shame $this->createUrl($this->route,$_GET);

(John Fragkoulis) #7

I think the correct would be


(Pawel Drylo) #8


I know this is not the answer to your question (well, maybe partial :) ), but why won’t you use url currently requested?


(Jacob Moen) #9

It’s better to use the current route as the URL can change depending on the URL rules.

(Konapaz) #10

Hi Zaccaria

I had create current url adding extra parameter(s) in 2-3 different ways in the past.

But I had a few problems with url rules or (I think) security weakness

Your way is short and straight full

Please let me know:

  1. Is there any problem with url manager rules ?

  2. Is there any security issue ? (hacking etc)