PDA

Просмотр полной версии : Indexed_search только по заданной ветке?


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

Pavel Antonov
29.01.2007, 13:51
Как заставить индекс серч искать только по заданой ветке?
Ато у меня 3 сайта в дереве так на каждом сайте - общие результаты))

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

Я делаю так:
Формирую руками поисковую форму и проставляю в нее 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>

}
Скрывается возможность выбирать расширенные методы поиска и установку секции посика:
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
}
}Удачи!