Search - Only Items (Items view all results)

Sorry if I overlooked some configuration but how can I get the search form to go search only Items (no pages)? The idea is to go straight to the Items " [View all results]".

Thank you

1 Like

I’ve asked for the same thing:

Thank you. If you managed to solve it, could you please give us a bit more details?

“The old search pages remain more or less as they were, so it would be possible to just have the search box point at, for example, the item browse page and get the “old” search”.

In this case we should replace the “search box” (form) with a new one or is there a way to change the target of the search box?

If you want a form that just goes directly to item results but otherwise works the same (same fulltext indexing), then you can just change the action of the search form.

The search form markup is in application/view/common/search-form.phtml, and you can copy that to view/common/search-form.phtml in your theme to allow you to override it. In the new copy of the file that’s in your theme, just change the line with the form tag on it, replacing the controller value with 'item' and the action value with 'browse':

<form action="<?php echo $this->escapeHtml($this->url('site/resource', ['controller' => 'item', 'action' => 'browse'], true)); ?>" id="search-form">

Thank you very much, it works!

I made a patch last year that adds a setting to set which resources you want, by site : page, item, item set, media. See