You can specify the routing as follow in the Config/routes.php.
```
Router::connect(
'/:query/*', array('controller' => 'listings', 'action' => 'search'), array(
'params' => array('query', 'cat'),
'named' => array(
'query', 'cat'
)
)
);
```
and specify the link as
```
echo $this->Html->link('text goes here', array('controller' => 'listings', 'action' => 'search', 'query' => 'foo', 'cat' => 1));
```