[FEATURE] Make linking of section titles configurable 93/20193/7
authorRalf Hettinger <ng@ralfhettinger.de>
Fri, 26 Apr 2013 16:25:36 +0000 (18:25 +0200)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Sat, 20 Dec 2014 10:06:30 +0000 (11:06 +0100)
Adding the TS property
plugin.tx_indexedsearch.linkSectionTitles = boolean
which allows turing on/off linking of the sections' titles.
Default is 1 to keep current behaviour.

Resolves: #16794
Releases: master
Change-Id: I0aa32ed49a16dcdd737907324a69d15057598920
Reviewed-on: http://review.typo3.org/20193
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/core/Documentation/Changelog/master/Feature-16794-MakeSectionLinkingForIndexedSearchResultsConfigurable.rst [new file with mode: 0644]
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php
typo3/sysext/indexed_search/ext_typoscript_setup.txt

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-16794-MakeSectionLinkingForIndexedSearchResultsConfigurable.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-16794-MakeSectionLinkingForIndexedSearchResultsConfigurable.rst
new file mode 100644 (file)
index 0000000..05ac324
--- /dev/null
@@ -0,0 +1,16 @@
+===========================================================
+Feature: #16794 - Linking of Indexed Search result sections
+===========================================================
+
+Description
+===========
+
+Per default the section headlines of indexed search results are links.
+It is possible to avoid those linking, thus having the sections
+displayed as simple text.
+
+.. code-block:: typoscript
+       plugin.tx_indexedsearch.linkSectionTitles = 0
+
+Will result in not linked section headlines.
+The setting is per default set to 1 in order to preserve current behaviour.
index 45b29df..0cfc846 100644 (file)
@@ -672,9 +672,11 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
                                                }
                                                if (!trim($sectionName)) {
                                                        $sectionTitleLinked = $this->pi_getLL('unnamedSection', '', TRUE) . ':';
-                                               } else {
+                                               } elseif ($this->conf['linkSectionTitles']) {
                                                        $onclick = 'document.' . $this->prefixId . '[\'' . $this->prefixId . '[_sections]\'].value=\'' . $theRLid . '\';document.' . $this->prefixId . '.submit();return false;';
                                                        $sectionTitleLinked = '<a href="#" onclick="' . htmlspecialchars($onclick) . '">' . htmlspecialchars($sectionName) . ':</a>';
+                                               } else {
+                                                       $sectionTitleLinked = htmlspecialchars($sectionName);
                                                }
                                                $this->resultSections[$id] = array($sectionName, count($resultRows));
                                                // Add content header:
index 8af4504..5fd4b2f 100644 (file)
@@ -81,6 +81,7 @@ plugin.tx_indexedsearch {
        }
 */
        forwardSearchWordsInResultLink = 0
+       linkSectionTitles = 1
 
        # Setting default values for piVars (please see the source code for the form-field names which you can preset values for here)
        _DEFAULT_PI_VARS {