You are here:   » Home » Documentation » Details » ZMS API » acc. to Objects » _zcatalogmanager

_zcatalogmanager.ZCatalogManager

ZMS uses the ZCatalog for the search.

ZCatalogItem.search_quote(s, maxlen=255, tag="·")

BESCHREIBUNG:
The function substitutes all tags (HTML) from the string with the stated characters and cuts them to a maximum length.
It is used to generate a preview of the page content of found search results but can also be used e.g. for generating a summary of the boby text of a news.

EINGABE-PARAMETER:
s[string]: the string
maxlen[int]: the maximum length of the return-string
tag[string]: the string for substitution of tags

AUSGABE-PARAMETER:
s[string]: the converted string

BEISPIELE
[1]  In this example the body text of a news is summarized:
 <dtml-var "search_quote(getObjProperty('newsText',REQUEST),255,'')">


ZCatalogManager.submitCatalogQuery(search_query, search_order_by, search_meta_types, search_clients, REQUEST)

BESCHREIBUNG:
The function conducts a full-text-search on zhe ZCatalog of the Root-object.

EINGABE-PARAMETER:
search_query[string]: the searched string
search_order_by[int]: the sorting order of the found objects (0= Score; 1= change date)
search_meta_types[list]: meta type of the searched objects; this can be a list of meta_types and meta_ids of spec. objects. If the list is empty objects of all meta types are searched.
search_clients[int]: 0 searchs only in the current client, 1 also in the subordinate clients (since ZMS 2.3)
REQUEST: the HTTP-request object

AUSGABE-PARAMETER:
nodes[list]: List of objects

BEISPIELE
[1]  Searchs and lists all staff members with "schmidt" occuring in their names:
 <dtml-in "submitCatalogQuery('*schmidt*',0,['mitarbeiter'],0,REQUEST)">
  <dtml-var "getObjProperty('vorname',REQUEST)">
  <dtml-var "getObjProperty('nachname',REQUEST)">
  <br>
 </dtml-in>