Dennis_87 Posted December 8, 2016 Share Posted December 8, 2016 Someone know how to edit the quick search so default search is all content? Example when on pages it does not only search articles. Link to comment Share on other sites More sharing options...
rgf100 Posted February 7, 2017 Share Posted February 7, 2017 Looking at this myself. I think I've figured it out just with template changes - seems to be working. in Core>Front>Global>Navbar Find <span data-role='searchingIn'> Delete everything in that span (leave the span tags) and replace with {lang="search_everything"} Find <li class='ipsMenu_item {{if output.defaultSearchOption[0] == 'all' AND !count(output.contextualSearchOptions)}}ipsMenu_itemChecked{{endif}}' data-ipsMenuValue='all'> Replace with <li class='ipsMenu_item ipsMenu_itemChecked' data-ipsMenuValue='all'> Find <li class='ipsMenu_item {{if $setDefault === FALSE}}ipsMenu_itemChecked{{$setDefault = TRUE;}}{{endif}}' data-ipsMenuValue='{expression="json_encode( $data )"}' data-options='{expression="json_encode( $data )"}'> Replace with <li class='ipsMenu_item' data-ipsMenuValue='{expression="json_encode( $data )"}' data-options='{expression="json_encode( $data )"}'> I've only just done this myself and done some quick testing and it seems to work as you'd expect. Link to comment Share on other sites More sharing options...
Dennis_87 Posted February 8, 2017 Author Share Posted February 8, 2017 I cant get this to work, looks like my template file is not exactly the same. How will this be edited to apply the search all content changes? Thanks {{if !$preview and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'search' ) ) AND !in_array('ipsLayout_minimal', \IPS\Output::i()->bodyClasses )}} <div id='searchWrap'> <div id='elSearch' data-controller='core.front.core.quickSearch' itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction" data-default="{expression="\IPS\Output::i()->defaultSearchOption[0]"}"> <form accept-charset='utf-8' action='{url="app=core&module=search&controller=search" seoTemplate="search"}' method='{{if settings.use_friendly_urls and settings.htaccess_mod_rewrite}}get{{else}}post{{endif}}'> <meta itemprop="target" content="{url="app=core&module=search&controller=search&q=" seoTemplate="search"}{q}"> <input type="hidden" name="type" value="{expression="\IPS\Output::i()->defaultSearchOption[0]"}" data-role="searchFilter"> <a href='#' id='elSearchFilter' data-ipsMenu data-ipsMenu-selectable='radio' data-ipsMenu-appendTo='#elSearch' class="ipsHide"> <span data-role='searchingIn'> {expression="\IPS\Member::loggedIn()->language()->addToStack( \IPS\Output::i()->defaultSearchOption[1] )"} </span> <i class='fa fa-caret-down'></i> </a> <ul id='elSearchFilter_menu' class='ipsMenu ipsMenu_selectable ipsMenu_narrow ipsHide'> <li class='ipsMenu_item {{if output.defaultSearchOption[0] == 'all'}}ipsMenu_itemChecked{{endif}}' data-ipsMenuValue='all'> <a href='{url="app=core&module=search&controller=search" csrf="1"}' title='{lang="search_everything"}'>{lang="search_everything"}</a> </li> <li class='ipsMenu_sep'><hr></li> {{if count( output.contextualSearchOptions )}} {{foreach output.contextualSearchOptions as $name => $data}} <li class='ipsMenu_item' data-ipsMenuValue='{expression="json_encode( $data )"}' data-options='{expression="json_encode( $data )"}'> <a href='#'>{$name}</a> </li> {{endforeach}} <li class='ipsMenu_sep'><hr></li> {{endif}} <li data-role='globalSearchMenuOptions'></li> <li class='ipsMenu_item ipsMenu_itemNonSelect'> <a href='{url="app=core&module=search&controller=search" seoTemplate="search"}' accesskey='4'><i class='fa fa-cog'></i> {lang="advanced_search"}</a> </li> </ul> <input type='search' id='elSearchField' placeholder='{lang="search_placeholder"}' name='q' itemprop="query-input"> <button type='submit'><i class='fa fa-search'></i></button> </form> </div> </div> {{endif}} Link to comment Share on other sites More sharing options...
rgf100 Posted February 8, 2017 Share Posted February 8, 2017 Have you already edited your template? Can you revert changes then try? Link to comment Share on other sites More sharing options...
Dennis_87 Posted February 8, 2017 Author Share Posted February 8, 2017 5 minutes ago, rgf100 said: Have you already edited your template? Can you revert changes then try? Did try the default theme now with the same issue. The search all content option is chosen but also the category and the search results are not all content. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.