XF 2.2 XF Link Parameters - Search Query - redirecting to homepage


Well-known member
Hey all,

I'm struggling with this xf link builder - I have all my other link builders working correctly (navigating to sub-pages / thread pages etc), but my "search query" search link isn't working correctly.

<form id="form" action="{{ link('note/search', $query ) }}">
    <input type="search" id="query" name="q" placeholder="Search...">

When the Search button is clicked, I end up on index.php?q=query, vs where I'm expecting to end up: index.php/note/search&q=query

Do I need to change any of the route parameters to allow this?

Any help appreciated!
Use {{ link('note/search', null, $query) }}. Both link() (used in templates) and buildLink() (used on PHP side) have similar parameter order.
Top Bottom