I added a namespace and put several pages into it. However, I cannot make the search function default to searching both the main and the new namespace. The namespace is "Key Term", so I added this to my LocalSettings.php:
$wgNamespacesToBeSearchedDefault = array( NS_MAIN => true, NS_KEY_TERM => true );
It only searches the Main namespace.
Bass, Joshua L wrote:
I added a namespace and put several pages into it. However, I cannot make the search function default to searching both the main and the new namespace. The namespace is "Key Term", so I added this to my LocalSettings.php:
$wgNamespacesToBeSearchedDefault = array( NS_MAIN => true, NS_KEY_TERM => true );
It only searches the Main namespace.
$wgNamespacesToBeSearchedDefault[NS_MAIN] = true; $wgNamespacesToBeSearchedDefault[NS_KEY_TERM] = true;
What you had would clear other namespaces.
-- Jamie ------------------------------------------------------------------- http://endeavour.zapto.org/astro73/ Thank you to JosephM for inviting me to Gmail! Have lots of invites. Gmail now has 2GB.
Jamie Bliss <astronouth7303@...> writes:
$wgNamespacesToBeSearchedDefault[NS_MAIN] = true; $wgNamespacesToBeSearchedDefault[NS_KEY_TERM] = true;
What you had would clear other namespaces.
Seems I needed this:
$wgNamespacesToBeSearchedDefault = array( NS_MAIN => true, 100 => 1, 102 => 1 );
where 100 and 102 are my custom namespaces. This works now.
mediawiki-l@lists.wikimedia.org