From: Erik Bernhardson Date: Tue, 18 Apr 2017 21:03:23 +0000 (-0700) Subject: Allow editors to exclude navigation items from search indices X-Git-Tag: 1.31.0-rc.0~3470^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=53514e5d5d970acc584f51d3345839a2e3304713;p=lhc%2Fweb%2Fwiklou.git Allow editors to exclude navigation items from search indices When you perform a particular search, the results can be polluted by navigation elements that are not supposed to be displayed. This gives editors the ability to mark sections of the document that should not be indexed. Bug: T162905 Change-Id: Iab2b83c3778cd5f7f44736c0da569fd938ae2968 --- diff --git a/includes/content/WikiTextStructure.php b/includes/content/WikiTextStructure.php index 9f79aa8d08..afa03b8f14 100644 --- a/includes/content/WikiTextStructure.php +++ b/includes/content/WikiTextStructure.php @@ -37,6 +37,9 @@ class WikiTextStructure { 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', // Collapsed fields are hidden by default so we don't want them showing up. '.autocollapse', + // Content explicitly decided to be not searchable by editors such + // as custom navigation templates. + '.navigation-not-searchable' ]; /**