Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

fetch( 'content', 'search' )

The fetch function search of the content module: 12 parameter(s), 1 required.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/fetch-functions/content/search.md

On this page

fetch( 'content', 'search' )

Defined in kernel/content/function_definition.php; it calls eZContentFunctionCollection::fetchContentSearch() (kernel/content/ezcontentfunctioncollection.php). Operation type: read.

Parameters

ParameterTypeRequiredDefault
textstringyes
subtree_arrayarraynofalse
offsetintegernofalse
limitintegernofalse
publish_timestampmixednofalse
publish_dateintegernofalse
section_idintegernofalse
class_idintegernofalse
class_attribute_idintegernofalse
ignore_visibilityboolnonull
limitationarraynonull
sort_bymixednofalse

Example

In a template (the values are placeholders of each parameter's type):

{def $result = fetch( 'content', 'search', hash( 'text', 'text' ) )}
{* with every parameter *}
{def $all = fetch( 'content', 'search', hash( 'text', 'text',
                                         'subtree_array', array(),
                                         'offset', 1,
                                         'limit', 1,
                                         'publish_timestamp', $publish_timestamp,
                                         'publish_date', 1,
                                         'section_id', 1,
                                         'class_id', 1,
                                         'class_attribute_id', 1,
                                         'ignore_visibility', true(),
                                         'limitation', array(),
                                         'sort_by', $sort_by ) )}

In PHP, the same function through the function handler (lib/ezutils/classes/ezfunctionhandler.php):

$result = eZFunctionHandler::execute( 'content', 'search', array( 'text' => 'text' ) );

Generated by ./console exp:help:examples from kernel/content/function_definition.php, kernel/content/ezcontentfunctioncollection.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x