有谁知道如何从.twig格式的url获取参数

Does anyone know how to get parameter from url like this:

mywebsite.com/index.php?route=account/register&a=1&b=2

i want to get param: a, b in .twig files opencart 3.x

Why you need it get in twig? You can get it in corresponding controller file:

if (isset($this->request->get['a'])) {
            $a = $this->request->get['a'];
} else {
$a = '';
}
if (isset($this->request->get['b'])) {
            $b = $this->request->get['b'];
} else {
$b = '';
}

and call in twig...

{{ a }} {{ b }}