#75: Blacklisting contenttypes for quicksearch and searchform
Create a blacklist in Plone to exclude certain contenttypes from the quicksearch and from the searchform. 特定のcontenttypesをquicksearchから締め出すPloneで、そして、searchformからブラックリストを作成してください。
#75: Blacklisting contenttypes for quicksearch and searchform
Motivation 動機づけ
A good example for the use of the mentioned blacklist would be the Plone.org site. 前述のブラックリストの使用のための良い例は、Plone.orgサイトです。 When using the quicksearch, most of the search hits are coming from the issue collector, thus polluting the search result. quicksearchを使うとき、大部分の検索ヒットは問題コレクターから来ています。このように、検索結果を汚染します。 It would be convenient if the Collector Issue contenttype could be blacklisted. Collector Issue contenttypeがブラックリストに記載されることができるならば、それは便利でしょう。 Proposal 提案
The catalog searches for the standard plone quicksearch and advanced search are in a skin script/template in the default Plone skin. These catalog searches should be changed is such a way that they use the blacklist to exclude certain content types. 標準のplone quicksearchとエキスパート検索のカタログ検索は、デフォルトPlone皮膜の中に皮膚スクリプト/テンプレートであります。これらのカタログ検索は変わらなければなりません。そして、彼らが特定の内容を除外するブラックリストを用いられるそのような方法はタイプです。 Implementation 実施
The blacklist of contenttypes can placed in a lines property of the portal_properties/site_properties or the portal_catalog tool. portal_properties/site_propertiesまたはportal_catalogツールの線財産に置かれるcontenttypes缶のブラックリスト。
Searching in Plone is provided by the following skin templates: Ploneで捜すことは、以下の皮膚テンプレートで提供されます:
- search.pt (showing the results) −search.pt(結果を示す) - search_form.pt −search_form.pt - global_search_box.pt −global_search_box.pt
search.pt is not doing a direct call to portal_catalog, but uses the skin script queryCatalog.
search.ptはportal_catalogに直接の呼び出しをしていなくて、皮膚スクリプト『queryCatalog』を使います。
A new method in the portal_utils tool will be provided getUserFriendlyTypes that is able to get
portal_utilsツールにおける新しい方法は、それが得ることができる『getUserFriendlyTypes』を提供されます
a list of all usable types (all types minus the blacklist). When provided with a typeList argument
使える全てのリストは、タイプします(全てのタイプ引くブラックリスト)。typeList引数を備えているとき、
containing a list of types, this list if filtered for blacklisted types.
タイプ(ブラックリストに記載されたタイプのためにフィルターをかけられるならばこのリスト)のリストを含むこと。
The lines property should be named unfriendly_types.
線資産は、『unfriendly_types』という名前をつけられなければなりません。
In this way maintenance through the ZMI is possible. However, this is quite error prone. このように、ZMIを通してのメンテナンスは、可能です。しかし、これはうつ伏せの非常にエラーです。
Better solution is a configlet where the blacklist can be maintained through point-and-click, but this can still use the same backend.
より良い解決はブラックリストが『ポイント&クリック』を通して維持されることができるconfigletです、しかし、これは同じバックエンドをまだ使うことができます。