Skip to content

Commit

Permalink
Add setting to searches.ini.
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Dec 9, 2024
1 parent bb19d0d commit bcd2509
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions config/vufind/searches.ini
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,14 @@ include_facets = true
; https://vufind.org/wiki/indexing:tracking_record_changes
sort = "last_indexed desc"

; The RSS feed will populate the <link> tag using data from either the record router
; (linking to the page for the record) or the record driver (linking to URLs found in
; the record data). By default, the router will be prioritized, and driver links will
; be used only if routes cannot be found (e.g. for web results, which have no record
; page). If you set this to true, the logic will be reversed, and record driver links
; will be given priority, with routes used only when no links are found in the driver.
prioritizeRecordDriverLinks = false

; The following two sections control the behavior of the autocomplete drop-downs
; associated with search boxes. The [Autocomplete] section contains global default
; settings, while the [Autocomplete_Types] section allows you to associate different
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public function __invoke(
if (!empty($options)) {
throw new \Exception('Unexpected options sent to factory.');
}
$helper = new $requestedName();
$config = $container->get(\VuFind\Config\PluginManager::class)->get('searches');
$settings = ['prioritizeRecordDriverLinks' => $config->RSS->prioritizeRecordDriverLinks ?? false];
$helper = new $requestedName($settings);
$helper->registerExtensions($container);
return $helper;
}
Expand Down

0 comments on commit bcd2509

Please sign in to comment.