Since I would like to fill by sidebar with several custom widgets, I created a few sidebar partials which load those widgets. One of them is a little search component, which simply take the search term, validates it and pass it as an urlquery to the main search page.
However, everything works fine, just the Redirect::to() is not performed.
If I render this component in the page directly, it works, so I guess it has to do with the Redirect::to() within a component which is rendered in a partial.
How can I solve this?
If there’s a better idea how I can do my sitemaps, I’m open for ideas, too ^^
public function onRun()
{
if ($this->getInput()) return;
$queryParameters = ['searchterm' => $this->searchterm];
$queryString = http_build_query($queryParameters);
$url = ($this->pageUrl($this->searchPage) . '?' . $queryString);
// TODO: Redirect dont work if the component is used in a partial. Works in page!
return Redirect::to($url);
}