Wählen Sie Ihre Sprache:

<we:listview type="search">

Since version: - | Requires endtag: yes

Description

This tag generates a list of webEdition-documents and/or objects matching the search criteria.

If more than one search term is entered, all documents will be found, which contain one of the terms. The prefix "+" marks search terms which need to be contained in the found documents. The prefix "-" marks terms which need not to be contained in the found documents.

NOTE: If some documents/objects are found twice or not at all, the index table may be faulty. In that case please perform a rebuild of the index table (edit ⇒ rebuild ⇒ index table).

Attributes

type

Default value: - | since version: - | required: yes

Allowed values:

  • search

name

Default value: - | since version: 3.0.0.0 | required: no

Set this attribute to a unique name.


doctype

Default value: - | since version: - | required: no

Set this attribute to the document type of the webEdition documents of which an overview is to be displayed. There can only be one specified document type.


categories

Default value: - | since version: - | required: no

Set this attribute to a comma separated list of the categories of webEdition documents or objects from which to generate the overview. Please note that from version 2.0 on, there are multi-level categories and therefore the categories have to be entered with the full path. If, however, the categories are located in the highest level directory, the category name will suffice.


catOr

Default value: - | since version: - | required: no

If the value of the attribute "categories" is set to multiple categories and this attribute is set to "true", a disjunction (OR-instruction) will be made. Thus, the listed webEdition documents or objects have to contain at least one of the given categories. If this attribute is set to "false" an AND-instruction will be executed and the listed webEdition documents or objects have to contain all of the given categories.

Allowed values:

  • true

rows

Default value: - | since version: - | required: no

Set this attribute to define the maximum number of displayed entries. The "back" and "forward" buttons can be created with <we:back> and <we:next> if more entries are found than can be displayed.


order

Default value: - | since version: - | required: no

Set this attribute to the name of the field from which to sort the list.

Allowed values:

  • random()
  • we_creationdate
  • we_filename
  • we_id
  • we_published
  • we_moddate

desc

Default value: - | since version: - | required: no

Set this attribute to "true" to reverse the order of the list. If the attribute is unset, the sorting order is kept.

Allowed values:

  • true

casesensitive

Default value: - | since version: - | required: no

If the attribute "casesensitive" has been set to "true", webEdition will differentiate between upper and lower-case letters.

Allowed values:

  • true
  • false

classid

Default value: - | since version: - | required: no

Set this attribute to the ID of the class of objects that is to be used in the overview.


workspaceID

Default value: - | since version: - | required: no

Set this attribute to a comma seperated list of IDs of the directories which should be searched. Only the webEdition documents found in this directory are displayed. Only objects assigned to this directory as a work area are displayed.


cfilter

Default value: off | since version: 5.1.0.0 | required: no

This attribut decides, how the customer filters on documents/ objects are considered.

Allowed values:

  • false
  • true
  • auto

Syntax

<we:listview type="search" [name="attribute"] [doctype="attribute"] [categories="attribute"] [catOr="true"] [rows="attribute"] [order="random()|we_creationdate|we_filename|we_id|we_published"] [desc="true"] [casesensitive="true|false"] [classid="attribute"] [workspaceID="attribute"] [cfilter="false|true|auto"]> ... </we:listview>

Examples

Example #1

<we:ifSearch name="search" set="true">
  <we:ifVarEmpty match="we_lv_search_search" doc="top" type="request">
    <p>
      You have not entered a search term.<br />
      Please enter a search term and try again.
    </p>
  </we:ifVarEmpty>
  <we:ifVarNotEmpty match="we_lv_search_search" doc="top" type="request">
    <we:listview type="search" name="search" rows="10" order="Title">
      <we:ifFound>
        <p>
          For your query <em><strong><we:search type="print" name="search" xml="true"/></strong></em> the following hits were found:
        </p>
        <p>
          Page: <we:listviewPageNr/> of <we:listviewPages/> |
          Hits: <we:listviewStart/> to <we:listviewEnd/>
          <we:ifBack> | <we:back>back</we:back></we:ifBack>
          <we:ifNext> | <we:next>next</we:next></we:ifNext>
        </p>
        <hr />
        <ul>
          <we:repeat>
            <li>
              <we:field name="Title" alt="we_path" hyperlink="true"/>
              <we:ifFieldNotEmpty match="Description">
                <br />
                <we:field name="Description" type="text"/>
              </we:ifFieldNotEmpty>
            </li>
          </we:repeat>
        </ul>
        <hr />
        <p>
          Page: <we:listviewPageNr/> of <we:listviewPages/> |
          Hits: <we:listviewStart/> to <we:listviewEnd/>
          <we:ifBack> | <we:back>back</we:back></we:ifBack>
          <we:ifNext> | <we:next>next</we:next></we:ifNext>
        </p>
      </we:ifFound>
      <we:ifNotFound>
        For your query <em><strong><we:search type="print" name="search" xml="true"/></strong></em> no results could be found.
      </we:ifNotFound>
    </we:listview>
  </we:ifVarNotEmpty>
</we:ifSearch>