Russian TYPO3 community

Russian TYPO3 community (http://forum.typo3.ru/index.php)
-   Общие вопросы (http://forum.typo3.ru/forumdisplay.php?f=12)
-   -   Indexed_search только по заданной ветке? (http://forum.typo3.ru/showthread.php?t=2540)

Seq 29.01.2007 03:53

Indexed_search только по заданной ветке?
 
Как заставить индекс серч искать только по заданой ветке?
Ато у меня 3 сайта в дереве так на каждом сайте - общие результаты))

Pavel Antonov 29.01.2007 13:51

Цитата:

Сообщение от Seq (Сообщение 9487)
Как заставить индекс серч искать только по заданой ветке?
Ато у меня 3 сайта в дереве так на каждом сайте - общие результаты))

Выбор ветки осуществляется через поле формы "tx_indexedsearch[_sections]".

Я делаю так:
  1. Формирую руками поисковую форму и проставляю в нее ID корня текущего сайта:
    Код:

    lib.menu.top = COA
    lib.menu.top.10 = COA
    lib.menu.top.10 {
        wrap =    <a name="top"></a><div class="search">|</div>
       
        10 = TEXT
        10.typolink.returnLast = url
        10.typolink.parameter = {$site.search.pid}
        10.wrap = <form id="search_form" name="search_form" action="|" method="post">

        20 = TEXT
        20.data = leveluid: 1
        20.wrap (
    <input type="hidden" name="tx_indexedsearch[_sections]" value="rl1_|" />
    <input type="hidden" name="tx_indexedsearch[_freeIndexUid]" value="_" />
    <input type="hidden" name="tx_indexedsearch[pointer]" value="0" />
    <input type="hidden" name="tx_indexedsearch[ext]" value="0" />
    <input type="hidden" name="tx_indexedsearch[type]" value="1" />
    <input type="hidden" name="tx_indexedsearch[defOp]" value="1" />
    <input type="hidden" name="tx_indexedsearch[media]" value="-1" />
    <input type="hidden" name="tx_indexedsearch[order]" value="rank_flag" />
    <input type="hidden" name="tx_indexedsearch[group]" value="flat" />
    <input type="hidden" name="tx_indexedsearch[lang]" value="-1" />
    <input type="hidden" name="tx_indexedsearch[desc]" value="0" />
    <input type="hidden" name="tx_indexedsearch[results]" value="10" />   
    <input id="search" type="text" class="text" name="tx_indexedsearch[sword]" accesskey="s" value="" />
        )
       
        30 = TEXT
        30.value = <input type="submit" class="bttn" value=" " /></form>
       
    }

  2. Скрывается возможность выбирать расширенные методы поиска и установку секции посика:
    Код:

    plugin.tx_indexedsearch {
        show {
            rules = 0
            advancedSearchLink = 0
        }   
        blind {
            type = 1
            defOp = 1
            sections = 0
            freeIndexUid = 1
            media = 1
            order = 1
            group = 1
            lang = 1
            desc = 1
            results = 1
        }
    }

Удачи!


Часовой пояс GMT +4, время: 11:20.

Работает на vBulletin® версия 3.8.1.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot